Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
reverse proxy POST method problem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
redwood
Guru
Guru


Joined: 27 Jan 2006
Posts: 306

PostPosted: Thu Jun 19, 2008 3:45 pm    Post subject: reverse proxy POST method problem Reply with quote

I'm trying to setup a reverse proxy following the guide
http://www.apachetutor.org/admin/reverseproxies


I have a private appserver: http://internal.example.com
which I wish to access through a reverse proxy from
the public webserver http://www.example.com

#/etc/apache2/vhosts.d/99_myproxy.conf
ProxyRequests off
ProxyPass /app/ http://internal.example.com/
ProxyHTMLURLMap http://internal.example.com http://www.example.com:8080/app
ProxyHTMLURLMap https://internal.example.com https://www.example.com/app

<Location /app/>
ProxyPassReverse /
SetOutputFilter proxy-html
ProxyHTMLURLMap / /app/
ProxyHTMLURLMap /app /app
RequestHeader unset Accept-Encoding
</Location>


My problem is that the webapp has a User:Pass login screen
using the POST method.
When I connect to http://www.example.com/app/
I get properly redirected to the login screen
https://www.example.com/app/cgi-bin/app/app_login

After entering my Username:Password, however, I just get a timeout.

When I monitory the http headers using Firefox's LiveHTTPHeaders addon
I see the following:

:!: POST /app/cgi-bin/app/app_login HTTP/1.1

:!: Host: www.example.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b5) Gecko/2008032619 Firefox/3.0b5

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

Referer: https://www.example.com/app/cgi-bin/app/app_login

Cookie: kt_language=en; PHPSESSID=4c44842ce...
Content-Type: application/x-www-form-urlencoded

Content-Length: 79

OP=LOGIN&SN=app.example.com&UI=user&PW=password&MO=BROWSE&LOGIN=+LOG+IN+


I think the POST / Host is wrong.
I think they should be
POST: /cgi-bin/app/app_login HTTP/1.1
Host: internal.example.com (or maybe www.example.com/app)


Any ideas on what I'm doing wrong?
Thanks.
Back to top
View user's profile Send private message
richard.scott
Veteran
Veteran


Joined: 19 May 2003
Posts: 1497
Location: Oxfordshire, UK

PostPosted: Mon Sep 22, 2008 10:59 am    Post subject: Reply with quote

Is that howto valid for this version of Apache?

I just use this in my virtual host config:

Code:
<IfDefine SSL>
        <IfDefine PROXY>
        <VirtualHost 192.168.100.46:443>
                ServerName website.domain

                ProxyPass / https://192.168.100.53:8443/
                ProxyPassReverse / https://192.168.100.53:8443/

                ProxyTimeout 600
                SSLProxyEngine On

                SSLEngine On
                SSLCertificateFile /etc/apache2/ssl/website.domain.cert
                SSLCertificateKeyFile /etc/apache2/ssl/website.domain.key

                SetOutputFilter DEFLATE

        </VirtualHost>
        </IfDefine>
</IfDefine>


This redirects incoming traffic on port 443 out to port 8443 on the other server.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum