Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running CentOS 5.5 with the stock Apache httpd-2.2.3.

I want to set up a proxy server which will forward proxy requests from a single IP address ( in the example below) and reject requests from all other addresses.

The problem is that apache is proxying all requests through port 81 (rather than just those from and denying all other traffic).

My configuration file is as follows:

Listen 81
<VirtualHost *:81>
  ProxyRequests On
  ProxyVia On
  <Proxy *:81>
    Order Deny,Allow
    Deny from all
    Allow from
  ErrorLog /var/log/httpd/proxy-error.log
  TransferLog /var/log/httpd/proxy-transfer.log
  LogLevel debug

This is the only configuration file with any reference to port 81. No forward proxying is allowed for traffic on port 80 (it serves a website). I am definitely not at IP address when making these requests via curl/Firefox proxy to test.

Commenting out the "Allow from" makes no difference - at this point it should simply deny all traffic to port 81.

Can anyone tell me how to fix the above configuration file to provide the requested behavior?

share|improve this question
up vote 2 down vote accepted

The match string for the <Proxy> block is for the resource being requested, not the server's listener.

Try <Proxy *> instead of <Proxy *:81>.

share|improve this answer
Perfect. It works now. Thanks. – user177660 May 18 '12 at 20:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.