How do i setup a reverse proxy with mod_proxy without redirecting to a different server or IP? This is an online host atmosphere. The main reason I do is to ensure that mod_proxy handles the communication using the client's browser therefore clearing up web server ways to serve the following request rather than feeding the client's browser. This is particularly important when utilizing language modules for example mod_php with MPM Prefork. The flow that I am attempting to achieve is: 1. The traffic resolves to www.mydomain.com on port 80. 2. The proxy transmits the request the net server. 3. The net server transmits the solution to the proxy and disconnects in the proxy. 4. The proxy feeds the customer browser.

Once that's working I wish to add nginx in the same Ip however for port 81 and proxy image demands to nginx on a single server. I don't want nginx handling the proxy nor will i want FCGI anything. I would like my standard Apache mod_rewrite and .htaccess to operate.

Thanks Tons!

Simply redirect towards the localhost on the different port? Host the application on port 8080, and employ mod_proxy to forward the demands:

ProxyPass /foo http://localhost:8080/foo
ProxyPassReverse /foo http://localhost:8080/foo

This might be useful for those who have application servers which are handling demands and also you want multiple instances combined on one machine. You should use one port per application server.

I'm not sure whether it really could be faster than simply using mod_php directly. Proxying demands also adds overhead.

Make certain additionally you use load these 2 modules

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

ProxyPass /TeamCity http://localhost/TeamCity
ProxyPassReverse /TeamCity http://localhost/TeamCity