Recently, I moved my legacy blog PersonalPage to newer wordpress on Amazon ec2. WordPress is on apache php. Old peronalpage was wrote on tomcat. They are running on different ports. Today, I configured that I only visit through same port by using mod_proxy. By mod_proxy, all the request www.allenlipeng47.com/PersonalPage will forward to www.allenlipeng47.com:8080/PersonalPage
In httpd, add below at the end of httpd.conf file
LoadModule proxy_module modules/mod_proxy.so
ProxyPass /PersonalPage http://www.allenlipeng47.com:8080/PersonalPage
ProxyPassReverse /PersonalPage http://www.allenlipeng47.com:8080/PersonalPage
In tomcat, add below proxyPort=”80″ at connector 8080 part:
<Connector port=”8080″ protocol=”HTTP/1.1″ proxyPort=”80″ />
Done. After I open my legacy www.allenlipeng47.com/PersonalPage website, it shows successfully.