# reverse proxy POST method problem

## redwood

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:

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

 :Exclamation:  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.

----------

## richard.scott

Is that howto valid for this version of Apache?

I just use this in my virtual host config:

```
<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.

----------

