Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: beckynet on March 29, 2009, 11:59:56 AM

Title: FEATURE REQUEST : Proxy_Pass and ProxyPreserveHost
Post by: beckynet on March 29, 2009, 11:59:56 AM
In reference of this 'bug' report.

http://bugs.contribs.org/show_bug.cgi?id=5079 (http://bugs.contribs.org/show_bug.cgi?id=5079)

Adding a key in the e-smith db to add ProxyPreserveHost with default value to off|on

With this key On when you proxy_pass a domain name the $http_host is preserved. Actually the $http_host return the value of the proxy_pass http://xxx.xxx.xxx.xxx in place of http://www.exemple.com

Some php application (as prestashop) don't run without that.

Someone could help me find a solution until this option is created in the SME.

Proxy_pass create this, I need the line ProxyPreserveHost On

<VirtualHost 0.0.0.0:80>

    ServerName exemple.com
    ServerAlias server.exemple.com ftp.exemple.com mail.exemple.com
proxy.exemple.com wpad.exemple.com www.exemple.com

    RewriteEngine on
    RewriteCond %REQUEST_METHOD ^(TRACE|TRACK)
    RewriteRule .* - [F]
    ProxyPreserveHost On
    ProxyPass / http://xxx.xxx.xxx.xxx/
    ProxyPassReverse / http://xxx.xxx.xxx.xxx/
</VirtualHost>

Thanks in advance Olivier Beeckmans
Title: Re: FEATURE REQUEST : Proxy_Pass and ProxyPreserveHost
Post by: David Harper on March 29, 2009, 01:26:06 PM
Oliver,

This belongs in the bug tracker. You should reopen the existing bug and then reassign it to the product "SME Server Future".
Title: Re: FEATURE REQUEST : Proxy_Pass and ProxyPreserveHost
Post by: beckynet on March 29, 2009, 02:22:09 PM
I don't know how to correctly do that.

Thanks a lot

Olivier Beeckmans
Title: Re: FEATURE REQUEST : Proxy_Pass and ProxyPreserveHost
Post by: David Harper on March 29, 2009, 03:59:00 PM
For the time being, just click the "Reopen" button and make a note asking for the bug to be assigned to SME Server Future. Reference my post above if you like.
Title: Re: FEATURE REQUEST : Proxy_Pass and ProxyPreserveHost
Post by: beckynet on March 29, 2009, 05:59:42 PM
I can't see a button REOPEN

I can only change status from CLOSED to UNCONFIRMED or RESOLVED.

Thanks a Lot

Olivier Beeckmans
Title: Re: FEATURE REQUEST : Proxy_Pass and ProxyPreserveHost
Post by: David Harper on March 29, 2009, 06:02:22 PM
Okay, back to UNCONFIRMED then.
Title: Re: FEATURE REQUEST : Proxy_Pass and ProxyPreserveHost
Post by: beckynet on March 29, 2009, 06:39:27 PM
Hello David Harper

I've change the status to UNCONFIRMED in the Bugzilla.

And for the moment what must I do ? Correct manually the httpd.conf ? I've 8 domain to proxy_pass...

Do I have to wait long time for this change is made in the SME ?

And how will I be informed that this change is active ?

Is the page http://wiki.contribs.org/SME_Server:Documentation:FAQ#Proxy_Pass updated when new feature available ?

Thanks a Lot

Olivier Beeckmans
Title: Re: FEATURE REQUEST : Proxy_Pass and ProxyPreserveHost
Post by: David Harper on March 29, 2009, 07:17:08 PM
For the moment, you can implement the change you need as a custom template. The manual contains instructions for creating templates, so take a look there and post back here if you need a little help along the way.
Title: Re: FEATURE REQUEST : Proxy_Pass and ProxyPreserveHost
Post by: beckynet on March 29, 2009, 10:25:42 PM
Hello I've find it...

cp /etc/e-smith/templates/etc/httpd/conf/httpd.conf/ProxyPassVirtualHosts/26RewriteTraceAndTrack /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/ProxyPassVirtualHosts/

cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/ProxyPassVirtualHosts/

pico 26RewriteTraceAndTrack and add 'ProxyPreserveHost On' at the end of the file


    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
    ProxyPreserveHost On

I don't know if it's the best way to do what I need, but that seem to run...

Thanks Olivier Beeckmans
Title: Re: FEATURE REQUEST : Proxy_Pass and ProxyPreserveHost
Post by: cactus on March 29, 2009, 10:41:25 PM
Hello I've find it...

cp /etc/e-smith/templates/etc/httpd/conf/httpd.conf/ProxyPassVirtualHosts/26RewriteTraceAndTrack /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/ProxyPassVirtualHosts/

cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/ProxyPassVirtualHosts/

pico 26RewriteTraceAndTrack and add 'ProxyPreserveHost On' at the end of the file


    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
    ProxyPreserveHost On

I don't know if it's the best way to do what I need, but that seem to run...

Thanks Olivier Beeckmans
Don't forget to expand your configuration files and restart your webserver, which can be done like this for instance:
Code: [Select]
signal-event remoteaccess-update