Apache reverse proxy virtual host

Brazen

Diamond Member
Jul 14, 2000
4,259
0
0
I'm trying to set up a virtual host that does a reverse proxy into another webserver, but only allow access from a single ip address. Here is what my virtual host configuration looks like:

<VirtualHost abc.abc.abc.abc:80>
ServerName host.domain.com:80

ProxyPass / http://10.10.5.30/
proxyPassReverse / http://10.10.5.30/

<Directory proxy:*>
Order Deny,Allow
Deny from all
Allow from 111.222.333.123
</Directory>

Now it performs the reverse proxy fine and allows access to the site, but it is allowing access from ANYWHERE, instead of denying from all and only allowing from 111.222.333.123 (fake). Anybody know what I'm doing wrong? I've never tried doing this before, but the documentation looksl like this is the correct way of configuring it.
 

Brazen

Diamond Member
Jul 14, 2000
4,259
0
0
Nevermind, I figured it out. I was looking at the old Apache 1.3 documentation, when I am using Apache 2.0. The proper directives are:
<VirtualHost abc.abc.abc.abc:80>
ServerName host.domain.com:80

ProxyPass / http://10.10.5.30/
proxyPassReverse / http://10.10.5.30/

<Proxy *>
Order deny,allow
Deny from all
Allow from 111.222.333.123
</Proxy>