1

I have a non-apache server running on http://10.0.0.1:9000. My Apache server is running on 127.0.0.1:8000. I want Apache to reverse proxy all requests to the url /app/ and pass it on to http://10.0.0.1:9000. The following is my configuration.

ProxyRequests Off
ProxyPreserveHost On
ProxyPass /app/ http://10.0.0.1:9000/
ProxyPassReverse /app/ http://10.0.0.1:9000/

I just can't seem to get it working. No requests are being forwarded. Not sure if I need more configurations. I don't wish to redirect just proxy it.

Thanks in advance!

2
  • The ProxyRequests Off is not necessary. And you probably need ProxyPass /app/ http://10.0.0.1:9000/app/. And are you sure you need ProxyPassReverse? Aside from that, can you post the access/error log entries of what happens when you do make a request, of both servers?
    – Halfgaar
    Commented Aug 11, 2015 at 20:26
  • ProxyRequests Off isn't necessary, per se, but it is recommended to set it for security purposes, despite Off being the default value.
    – Gene
    Commented Aug 12, 2015 at 7:06

1 Answer 1

0

Make sure the mod_proxy and mod_proxy_http modules are loaded. For example, something like this should be in your apache configuration:

LoadModule proxy_module       modules/mod_proxy.so
LoadModule proxy_http_module     modules/mod_proxy_http.so

(That example is from a CentOS 5 system)

This can vary between distributions. For example, on Ubuntu you can enable it with the a2enmod proxy_http command.

Any changes to the apache configuration will require a restart or reload.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .