I need to redirect all the requests from localhost:8080/app1/ to localhost/app1.

which is the best way to do it.

The only requirement is that the user must never be aware that he is accessing the application at port 80. i guess I need to set up Apache HTTPD proxying - I'm just not sure which is the best way to do it.

Thanks in advance.


Here's a full example, it's what I use to frontend apt-proxy with an apache that's already using port 80.

You need to put this either inside the relevent VirtualHost directive.

    ProxyRequests on
    ProxyPass               /
    ProxyPassReverse        /

            Order allow,deny
            Deny from none
            Allow from all

You may also need to run a2enmod proxy if the proxy module isn't enabled by default.


You're looking for "reverse proxy" configuration. Check the mod_proxy docs, look at ProxyPass.

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.