I have a web server running at and an Apache 2.2 proxy running at

If my web server is listening in on the standard port 80 then I can successfully make an HTTP request


and get back a response. However, if my web server is running on a non-standard port like 12345 then my request to the proxy


fails by returning a 404. I can access this page directly when the web server is running on either port 80 or 12345, I can access it through the proxy when the web server is running on port 80, but I can't access it through the proxy when the web server is running on port 12345.

Is there some kind of Apache configuration I need to set to allow requests to go to web servers on nonstandard ports?

EDIT: I should specify that I need a generic forward proxy that can access any site on the internet in addition to these local sites which run on nonstandard ports, so I can't simply set up a reverse proxy without adding configuration for every internal website.


Reverse Proxy

ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://server.com:12345/
ProxyPassReverse / http://server.com:12345/

-- may work without the / in front but this is how is written into the docs. http://httpd.apache.org/docs/2.2/mod/mod_proxy.html

|improve this answer|||||
  • Unfortunately, I need to access lots of websites rather than just this one, so I need a forward rather than reverse proxy. – Eli Courtwright Dec 14 '10 at 19:49
  • not sure I get it - how do you set the forward - from what is written so far you have a proxy - not a reversed proxy and you want the ability to proxy on non standard ports ... – silviud Dec 15 '10 at 1:15
  • I have a standard proxy setup via ProxyRequests On and it's important that I be able to get at via a normal proxy request like GET HTTP/1.1 which is why using ProxyPass and/or ProxyPassReverse is infeasible. Regardless, thanks for your help so far. – Eli Courtwright Dec 20 '10 at 14:22

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.