Apache Port forwarding 80 to 8080 and accessing applications hosted both in Apache (80), i.e phpMyadmin and Tomcat (8080)

元气小坏坏 提交于 2020-01-16 01:10:43

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!