View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0001186 | Pending Requests | Core Infrastructure | public | 2012-09-26 01:00 | 2014-07-03 17:04 | ||||||||
Reporter | laussetdelon | ||||||||||||
Assigned To | |||||||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||||||
Status | new | Resolution | open | ||||||||||
Product Version | |||||||||||||
Target Version | Fixed in Version | ||||||||||||
Summary | 0001186: Web2project through reverse proxy (3.0 pre) | ||||||||||||
Description | As many of my sites, I tried to put Web2project throught a reverse proxy. Following this : <VirtualHost> ProxyPreserveHost On ProxyPass / http://192.168.0.91/project/ ProxyPassReverse / http://192.168.0.91/project/ ServerName project.mydomain.tld CustomLog /var/log/apache2/access-project.log combined </VirtualHost> All the other sites are OK, not web2project. I succeed to get into home page after authentification but any action from there is bringing me back to authentification page. Do you have a clue ? Thnak you | ||||||||||||
Tags | No tags attached. | ||||||||||||
Attached Files |
|
![]() |
|
jmfg1973 (reporter) 2013-11-21 11:58 Last edited: 2013-11-21 12:00 |
My solution: My proxy configuration: <Location /project> ProxyPreserveHost On # necessary only if protocol change RequestHeader set X-Forwarded-Proto "https" early ProxyPass / http://[internal ip]/[internal direcotry]/ ProxyPassReverse / http://[internal ip]/[internal direcotry]/ </Location> Following code changes: add file include/security.php <?php global $w2Psecurity; // external host include protocol $w2Psecurity['X-Forwarded-URL'] = 'https://web2project.example.com'; ?> patched base.php 53,55c53,67 < $baseUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') ? 'https://' : < 'http://'; < $baseUrl .= safe_get_env('HTTP_HOST'); --- > if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && isset($_SERVER['HTTP_X_FORWARDED_HOST'])) { > $baseUrl=$_SERVER['HTTP_X_FORWARDED_PROTO'] . '://' . $_SERVER['HTTP_X_FORWARDED_HOST']; > > require_once($baseDir . '/includes/security.php'); > if (!isset($w2Psecurity['X-Forwarded-URL'])) { > $baseUrl=''; > } else if (strcmp($baseUrl,$w2Psecurity['X-Forwarded-URL']) != 0) { > $baseUrl=''; > } > } > if (strlen($baseUrl) === 0) { > $baseUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') ? 'https://' : > 'http://'; > $baseUrl .= safe_get_env('HTTP_HOST'); > } 61d72 < 131c142 < define('QUERY_STYLE_NUM', 1); \ No newline at end of file --- > define('QUERY_STYLE_NUM', 1); |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2012-09-26 01:00 | laussetdelon | New Issue | |
2012-11-21 21:37 | caseydk | Project | v3.0 Release => Pending Requests |
2013-11-21 11:57 | jmfg1973 | File Added: security.php | |
2013-11-21 11:58 | jmfg1973 | Note Added: 0003032 | |
2013-11-21 11:59 | jmfg1973 | File Added: base.php.patch | |
2013-11-21 12:00 | jmfg1973 | Note Edited: 0003032 | |
2014-01-01 16:37 | caseydk | Summary | Web2project throught reverse proxy (3.0 pre) => Web2project through reverse proxy (3.0 pre) |
2014-04-05 17:29 | caseydk | Category | General => Core Infrastructure |
2014-07-03 17:04 | caseydk | Relationship added | duplicate of 0000566 |