Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Apr 7 '10 at 3:20

This question came from our site for professional and enthusiast programmers.

    

2 Answers 2

up vote 1 down vote accepted

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               / http://127.0.0.1:1723/
    ProxyPassReverse        / http://127.0.0.1:1723/

    <Proxy http://127.0.0.1:1723/>
            Order allow,deny
            Deny from none
            Allow from all
    </Proxy>

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

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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