Hi,
I have installed both apache2 and tomcat7 on my ubuntu14.04 droplet. Apache is running on default port 80 and tomcat7 on 8080. I have an application deployed on tomcat and to access it, the url looks like: www.mysite.com:8080/Application_name/
But i want my application to come up when user just enters www.mysite.com
How to configure this?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!
As you are already running Apache, the easiest way to do this would be to set it up as a reverse proxy in front of Tomcat.
First, make sure
mod_proxy
is enabled by running:Then create a new virtual host in a file named
/etc/apache2/sites-available/tomcat.conf
In it, you can configure it to point your domain to your Tomcat app:Note that the
ServerName
directive is important. Make sure that the virtual host for what Apache is already serving on port 80 also hasServerName
set so that Apache can route the requests correctly.Finally, enable the site and reload Apache:
Now visiting www.mysite.com should display the Tomcat application.
Is much better use mod_jk instead of use mod_proxy.
https://github.com/CristianCardosoA/Install-mod_jk-on-apache-HTTPD
Thank you for helping . I have a problem When I follow your steps, bd does not work Please help me
Como es eso de crear una maquina virtual , me podrian explicar por favor :( … Gracias