I am looking to have both a forward proxy, and a reverse proxy at the same time. It seems as though, when I do this, the Proxy definition I put in place to restrict access to the forward proxy also effects the reverse proxy.

#... inside my virtual host
 RewriteEngine on

ProxyPass / http://mydomain.com/
ProxyPassReverse / http://mydomain.com/

ProxyRequests On
<Proxy *>
Order Deny,Allow
Deny from all
Allow from My.IP.Here


This works, although, the ProxyPass (reverse proxy) takes in the Proxy definition, Deny, Allow from My IP only.

Anyone know a way to restrict access to the forward proxy (I should be the only one allowed) but leave the reverse proxy open to anyone on any IP?

any suggestions would be appreciated.

8 Years
Discussion Span
Last Post by kylegetson

I found a solution that works... but is not ideal.

If i make the vhosts on separate ports, I can do a reverse proxy on the typical port 80, and the forward proxy on a different port (as it will be restricted to only me anyway).

Any ideas?


this can also be accomplished by doing multiple vhosts for the same IP. The first one as a proxy (which will be taken by default when the proxy request doesnt match the the host name of any other vhosts, followed by the actual reverse proxy vhost. seems to do everything i want, but still makes me duplicate the vhost.

hope that helps someone else. if someone finds a better solution, let me know.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.