Tuesday, April 15, 2014

Apache2 + Tomcat 8 to host website

Just a memo for the steps I took to host my website on Amazon EC2 using tomcat 8 + apache2.

Install and config tomcat 

Put your website code to TOMCAT/webapps

Domain setup in tomcat

Edit TOMCAT/conf/server.xml, add a new host entry:

    
 
        www.rungist.com

        
        


Config proxy port in server.xml

   

Then restart tomcat

Install and config apache2

Use apt-get install apache2 to install the http server.
Config ProxyPass entry on /etc/apache2/httpd.conf
 
ProxyPass         /  http://rungist.com:8080/
ProxyPassReverse  /  http://rungist.com:8080/

Then restart apache2 service: sudo service apache2 restart

Refer:

https://tomcat.apache.org/tomcat-7.0-doc/proxy-howto.html

No comments:

Post a Comment