logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: HTTPD Reverse Proxy - multiple hosts:ports
Author
SP3NGL3R



Joined: 24 Jan 2015
Posts: 3
Location: Atlanta, GA

PostPosted: Sat 24 Jan '15 17:48    Post subject: HTTPD Reverse Proxy - multiple hosts:ports Reply with quote

Hello All,

I'm having issues getting my second reverse proxy mapping to work. The first consistently works regardless of where it is placed in the file. ie. /app.one/ always works, even if it's placed under /app.two/. It doesn't seem to have anything to do with the ports, just something with the system behind. The closest I got to it working was turning off ProxyHTMLEnabled, but all that seemed to do was bounce my end-client over to http://myInternalIP:1080/. Which defeats the whole point of a reverse proxy making it a redirect proxy only.

Thoughts are greatly appreciated.
- Mike.

Apache: v2.4
TLS/SSL: currently off
Changes: only added the proxy.c and proxy.dll files to the base httpd.conf
ServerRoot: c:/PROGRAMS/Apache/Apache24
Code:
# proxy-html.conf
ProxyRequests Off  <-- this is an important security setting

ProxyPass /app.one/ http://localhost:32400/
<Location /app.one/>
    ProxyPassReverse /
    ProxyHTMLEnable On
    ProxyHTMLURLMap / /app.one/
</Location>

ProxyPass /app.two/ http://localhost:1080/
<Location /app.two/>
    ProxyPassReverse /
    ProxyHTMLEnable On
    ProxyHTMLURLMap / /app.two/
</Location>
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7306
Location: Germany, Next to Hamburg

PostPosted: Sun 25 Jan '15 1:19    Post subject: Reply with quote

You are mixing stuff. Put ProxyPass and ProxyPassReverse both inside the Location container or both outside.

Code:

<Location /app.one/>
    ProxyPass http://localhost:32400/
    ProxyPassReverse http://localhost:32400/
    ProxyHTMLEnable On
    ProxyHTMLURLMap http://localhost:32400/ /app.one/ 
</Location>
Back to top
SP3NGL3R



Joined: 24 Jan 2015
Posts: 3
Location: Atlanta, GA

PostPosted: Sun 25 Jan '15 20:03    Post subject: Reply with quote

No such luck. Tried both inside and outside, and your example structure as well with the example I have from inside the file of the below format. On the upside, I did get it to start not-erroring, but when I go to the given aliases it is just blank. Now, for all 4 apps.
Code:
ProxyRequests Off

ProxyPass /app0/ http://localhost:1080/
ProxyPass /app1/ http://localhost:1081/
ProxyPass /app2/ http://localhost:1082/
ProxyPass /app3/ http://localhost:1083/

ProxyHTMLURLMap http://localhost:1080/ /app0/
ProxyHTMLURLMap http://localhost:1081/ /app1/
ProxyHTMLURLMap http://localhost:1082/ /app2/
ProxyHTMLURLMap http://localhost:1083/ /app3/

<Location /app0/>
    ProxyPassReverse http://localhost:1080/
    ProxyHTMLEnable On
</Location>

<Location /app1/>
    ProxyPassReverse http://localhost:1081/
    ProxyHTMLEnable On
</Location>

<Location /app2/>
    ProxyPassReverse http://localhost:1082/
    ProxyHTMLEnable On
</Location>

<Location /app3/>
    ProxyPassReverse http://localhost:1083/
    ProxyHTMLEnable On
</Location>
Back to top
SP3NGL3R



Joined: 24 Jan 2015
Posts: 3
Location: Atlanta, GA

PostPosted: Sun 25 Jan '15 20:22    Post subject: ooo ... progress Reply with quote

Okay, now again just App0 is working, but App1,2,3 are now giving me a Content Encoding Error. Which seems to be related to Inflate/Deflate. I'm playing with that now to see. .. bah!
Back to top


Reply to topic   Topic: HTTPD Reverse Proxy - multiple hosts:ports View previous topic :: View next topic
Post new topic   Forum Index -> Apache