问题
I want to access an application 'myapp' hosted in tomcat server(8080) currently can be accessed by http://example.com:8080/myapp in http://example.com/myapp (apache server, port 80). What should I do for that? If I use port forwarding 80 to 8080 will I be able to access phpMyadmin, or any other applications running in port 80? Which method I should follow to accomplish the task?
I am using Ubuntu server 14.04.
回答1:
Use mod_proxy. Load module... Second define in your virtual host:
ProxyPass /myapp http://example.com:8080/myapp
ProxyPassReverse /myapp http://example.com:8080/myapp
But this will work when your tomcat apps has only relative links.
来源:https://stackoverflow.com/questions/28357772/apache-port-forwarding-80-to-8080-and-accessing-applications-hosted-both-in-apac