I try to access a running Webcit (needed by Citadel mailserver) by Apache's ProxyPass directive. This should only be possible within a private network while using port 2000.

My ideas is to deny from all but allow only from 10.8 network (that's my VPN).

Listen 2000
<VirtualHost *:2000>
        ProxyRequests On
        ProxyVia On

        ProxyPass / http://localhost:2000
        ProxyPassReverse / http://localhost:2000

        <Proxy *>
           Order Deny,Allow
           Deny from all
           Allow from 10.8

The problem is, when Webcit is running at port 2000, it's always accessible by every public address on my server despite of these VirtualHost settings. But I can't run it at port 80, because Apache runs at port 80. What can I do and I wonder, why the Apache VirtualHost configuration is ignored at all in that case?

  • If you aren't trying to relocate WebCit to a virtual host on port 80, why bother with this at all? Just firewall it and you're done. – Michael Hampton Mar 29 '14 at 14:37
  • Ok, this will probably work but I still would like to know why my attempt doesn't work. – Bevor Mar 29 '14 at 15:57

You are trying to bind both Webcit and Apache httpd to the local port 2000. In your setup Webcit is either fully accessible or not accessible at all depending on which server reserves the port first.

Move the Webcit service to a different port. Then proxy from the port 2000 to Webcit service port.

However, as Hampton noted, it probably makes more sense to use firewall.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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