Setup: 2 Webservers pointed to and :8081. Curl validates they work as expected. Apache with the following virt hosts:


  ServerAdmin foo@bar.com
  ProxyPass             /
  ProxyPassReverse      /


  ServerAdmin foo@bar.com
  ProxyPass             /
  ProxyPassReverse      /

On the server I can curl to the virtualhosts and receive appropriate responses. (curl gives me the webservers response from localhost:8080, etc)

remote hosts cannot however connect to or .2 at all. What am I missing?

Re: comments

Yes, the default directory Directive is still in place.

# Deny access to root file system
<Directory />
        Options None
        AllowOverride None
        Order Deny,Allow
        deny from all

No apache logs are generated when trying to reach remotely. They do get generated when curl from local.

If I point the webservers to *:8080 and *:8081 instead of binding to localhost, I can access them from a remote host via and if i specify the 8080 and 8081 ports (both ports work on both IP's, which is what I'm trying to avoid with apache reverse proxy bind to 80 on each interface)


curl verbose output: (similar for second webserver, and for

[user@host mingle_12_2_1]$ curl -v
* About to connect() to port 80
*   Trying connected
* Connected to ( port 80
> GET / HTTP/1.1
> User-Agent: curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
> Host:
> Accept: */*
< HTTP/1.1 302 Found
< Date: Tue, 16 Oct 2012 16:22:08 GMT
< Server: Jetty(6.1.19)
< Cache-Control: no-cache
< Location:
< X-Runtime: 130
< Content-Type: text/html; charset=utf-8
< Content-Length: 94
< Connection: close
Closing connection #0
<html><body>You are being <a href="">redirected</a>.</body></html>

log from the request local - - [16/Oct/2012:12:22:08 -0400] "GET / HTTP/1.1" 302 94

no apache access log or error log generated when requests from remote clients.


curl and logs to both virtual hosts are literally identical, except for the IP address used. Working w/ security admins to get the locked down rules for more info. I appreciate you guys' time.

  • is this your complete apache config ? are there any <directory/ directives ? what error do you get (take a look at error log file) when you try to connect from a remote host ? – m0ntassar Oct 16 '12 at 16:04
  • can you provide that from BOTH of virtualhosts not just one? – alexus Oct 16 '12 at 16:36

Since a proxypass setup operates entirely in the (virtual) URL-space, you need to grant access to each vhost via a Location directive:

  ServerAdmin foo@bar.com
  ProxyPass /
  ProxyPassReverse /
  <Location />
    Order allow,deny
    Allow from All

Also, get rid of the NameVirtualHosts if you're not using them, and a ServerName must be a hostname, there is no scheme or port or whatever. Just a hostname.

  • The added location directive had no impact on any of the results. Nor did the NameVirtualHosts (But I suppose thats a win, as the local requets was still successfully routed thru the proxy) – Yep Oct 16 '12 at 17:13
  • If there is no Documentroot for these vhosts, access control may not matter. Every vhost needs a DocumentRoot. – adaptr Oct 18 '12 at 9:09

can you provide:

  • curl syntax/output (use verbose)
  • logs from apache
  • ifconfig output
  • cat /etc/hosts
  • firewall ruleset
  • SELinux enable/disable?


also ServerAlias you should remove http:// part as that not needed, not to mention that since your ServerName is same as ServerAlias, ServerAlias is just not needed.

  • Nor is the entirety of that ServerAlias, since it is identical to the - already superfluous - ServerName this.is.my.ip form. – adaptr Oct 16 '12 at 16:29
  • ServerName can be IP (it doesn't make any sense but it can) ServerAlias is not needed if ServerName has same thing. – alexus Oct 16 '12 at 16:32
  • I did not say it could not be an IP. I said it was superfluous. – adaptr Oct 16 '12 at 16:34
  • @adaptr, right I'm agreeing with you) I'm just expanding my answer. – alexus Oct 16 '12 at 16:35
  • Then why don't you...expand your answer ? – adaptr Oct 16 '12 at 16:35

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.