I have a publicly available Apache server. Is it possible to redirect all incoming requests (e.g. http://publicname/test/) so that all accesses to /test/ are redirected to another server (in the private network, and not exposed to the internet, e.g. without using anything besides Apache?

 Internet --- httpp://xx.xx.xx/> Public Apache <- 192. 168. 1 .3   --- 192.168.1 .4-> Private Apache

1 Answer 1


I did this exact thing by modifying the apache configuration file, which is /etc/httpd/httpd.conf. All you have to do is add a section like this:

<Location /flask/>
    ProxyPass http://flask.intranet:8080/
    ProxyPassReverse http:/flask.intranet:8080/

"intranet" is what I have set up as the internal domain name. "flask" is the internal-only machine you have as I presume, but don't know for certain, that you could replace "flask.intranet" with "". The "/flask/" in the <Location> tag is what you refer to as "/test/".

I did this with Apache 2.2.21, but I bet it would work with other versions. Also, don't do what I did, use apachectl to stop and start Apache before you try to troubleshoot a configuration that "isn't working".

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.