Here is what needs to be done:
1. Run the Tomcat Server in port 80 instead of port 8080:
This can be done under the server.xml file present under "
Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443"
Change that to the below form:
Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443"Once done, the application will be accessible under http://example.com/webapp
2. Setting a web app to Document Root
There are two easier methods for doing this:
a) The ROOT folder:
By default, the ROOT folder of the Tomcat Server is showing the default Tomcat page. So backup that folder to another suitable location (apart from the "webapps" folder. Now either rename your application folder to the name ROOT (please note that it should be in capitals) or create a soft link for that folder with the name ROOT:
$ mv tomcatapp ROOT
or
$ ln -s tomcatapp ROOT
b) Re-direction method:
Edit the file tomcat_home

Change the http://example.com to your required URL.
Now, your application shall be accessible under http://example.com itself. Easier for the clients to access ;-)
Note: There are other methods also for doing this.

0 comments:
Post a Comment