Koozali.org: home of the SME Server

FEATURE REQUEST : Proxy_Pass and ProxyPreserveHost

Offline beckynet

  • *
  • 107
  • +0/-0
    • http://www.beckynet.be
FEATURE REQUEST : Proxy_Pass and ProxyPreserveHost
« on: March 29, 2009, 11:59:56 AM »
In reference of this 'bug' report.

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
----------------------------------------------------
Beeckmans Olivier
Belgian Army ICT Technician
I discovered E-Smith with version 4.12
----------------------------------------------------

Offline David Harper

  • *
  • 653
  • +0/-0
  • Watch this space
    • Workgroup Technology Solutions
Re: FEATURE REQUEST : Proxy_Pass and ProxyPreserveHost
« Reply #1 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".

Offline beckynet

  • *
  • 107
  • +0/-0
    • http://www.beckynet.be
Re: FEATURE REQUEST : Proxy_Pass and ProxyPreserveHost
« Reply #2 on: March 29, 2009, 02:22:09 PM »
I don't know how to correctly do that.

Thanks a lot

Olivier Beeckmans
----------------------------------------------------
Beeckmans Olivier
Belgian Army ICT Technician
I discovered E-Smith with version 4.12
----------------------------------------------------

Offline David Harper

  • *
  • 653
  • +0/-0
  • Watch this space
    • Workgroup Technology Solutions
Re: FEATURE REQUEST : Proxy_Pass and ProxyPreserveHost
« Reply #3 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.

Offline beckynet

  • *
  • 107
  • +0/-0
    • http://www.beckynet.be
Re: FEATURE REQUEST : Proxy_Pass and ProxyPreserveHost
« Reply #4 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
----------------------------------------------------
Beeckmans Olivier
Belgian Army ICT Technician
I discovered E-Smith with version 4.12
----------------------------------------------------

Offline David Harper

  • *
  • 653
  • +0/-0
  • Watch this space
    • Workgroup Technology Solutions
Re: FEATURE REQUEST : Proxy_Pass and ProxyPreserveHost
« Reply #5 on: March 29, 2009, 06:02:22 PM »
Okay, back to UNCONFIRMED then.

Offline beckynet

  • *
  • 107
  • +0/-0
    • http://www.beckynet.be
Re: FEATURE REQUEST : Proxy_Pass and ProxyPreserveHost
« Reply #6 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
----------------------------------------------------
Beeckmans Olivier
Belgian Army ICT Technician
I discovered E-Smith with version 4.12
----------------------------------------------------

Offline David Harper

  • *
  • 653
  • +0/-0
  • Watch this space
    • Workgroup Technology Solutions
Re: FEATURE REQUEST : Proxy_Pass and ProxyPreserveHost
« Reply #7 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.

Offline beckynet

  • *
  • 107
  • +0/-0
    • http://www.beckynet.be
Re: FEATURE REQUEST : Proxy_Pass and ProxyPreserveHost
« Reply #8 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
----------------------------------------------------
Beeckmans Olivier
Belgian Army ICT Technician
I discovered E-Smith with version 4.12
----------------------------------------------------

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: FEATURE REQUEST : Proxy_Pass and ProxyPreserveHost
« Reply #9 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
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)