Using ProxyPass causes redirection errors

Author Message

Patrick Allaert

Friday 06 April 2007 4:40:38 am

Having an apache2/php5 instance on port 80 and apache2/php4 on 8080, I am using the following configuration under the first instance to have everything on port 80:

<VirtualHost *:80>
ServerName user_site
ProxyPass / http://user_site:8080/
</VirtualHost>
<VirtualHost *:80>
ServerName admin_site
ProxyPass / http://admin_site:8080/
</VirtualHost>

Trying to login on http://admin_site/, I am authenticated and then redirected to http://admin_site:8080/ where I am asked to login.
In fact, going to http://admin_site/, I see that I am well authenticated, I guess that cookies are set for the :80 instance and not for the :8080.

Every "redirect" actions will put me on the :8080 site. Any way to "fix" the "site url" ?

Note the ":8080" that I have to use in my override/site.ini:
[SiteAccessSettings]
HostMatchMapItems[]=user_site;ezwebin_site_user
HostMatchMapItems[]=admin_site:8080;ezwebin_site_admin

Or the admin_site will not be catched!

Patrick ALLAERT
http://patrickallaert.blogspot.com/

Patrick Allaert

Monday 09 April 2007 4:37:15 am

Solution was quite simple:

<VirtualHost *:80>
ServerName user_site
ProxyPass / http://user_site:8080/
ProxyPassReverse / http://user_site:8080/
</VirtualHost>
<VirtualHost *:80>
ServerName admin_site
ProxyPass / http://admin_site:8080/
ProxyPassReverse / http://admin_site:8080/
</VirtualHost>

Thanks to Paul Borgermans!

Patrick ALLAERT
http://patrickallaert.blogspot.com/

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 11:16:54
Script start
Timing: Jan 18 2025 11:16:54
Module start 'layout'
Timing: Jan 18 2025 11:16:54
Module start 'content'
Timing: Jan 18 2025 11:16:54
Module end 'content'
Timing: Jan 18 2025 11:16:54
Script end

Main resources:

Total runtime0.6089 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 588.1484152.6406
Module start 'layout' 0.00660.0033 740.789139.4766
Module start 'content' 0.00990.5976 780.2656490.1484
Module end 'content' 0.60740.0014 1,270.414112.1250
Script end 0.6089  1,282.5391 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.5583160.0002
Check MTime0.00130.2087160.0001
Mysql Total
Database connection0.00090.149810.0009
Mysqli_queries0.552890.7878520.0106
Looping result0.00060.0918500.0000
Template Total0.569093.420.2845
Template load0.00250.414520.0013
Template processing0.566593.027520.2832
Template load and register function0.00010.019910.0001
states
state_id_array0.00120.196110.0012
state_identifier_array0.00100.164520.0005
Override
Cache load0.00210.3490310.0001
Sytem overhead
Fetch class attribute can translate value0.00100.163110.0010
Fetch class attribute name0.00150.239830.0005
XML
Image XML parsing0.00050.090210.0005
class_abstraction
Instantiating content class attribute0.00000.002040.0000
General
dbfile0.00090.1481160.0001
String conversion0.00000.001540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 11
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs