tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: URL "simplification"
Date Mon, 10 Oct 2011 10:53:55 GMT
On 10/10/2011 09:56, Léa Massiot wrote:
> 
> Hello,
> 
> Thank you for reading my post. Here is my question:
> 
> - Presently, to access my WebApp first page, I have to type in the following
> URL in a browser:
> http://hostname-or-ip:8080/my-webapp/
> - Instead, I wish I could type in a URL such as:
> http://my-webapp/
> Is it possible?
> How?
> 
> And by the way, I don't know what's the name of such an operation. I used
> the expression "URL simplification"...
> 
> Thank you for pointing me in the right direction!

There are three parts to this.

1. Removing /my-webapp/ from the end of the URL
   - Deploy your web application as the ROOT web application
     Read the docs or search the list archives for the various
     ways of doing this.

2. Removing the port (8080) from the URL
   - Configure your HTTP connector to use port 80 rather than 8080
     Port 80 is privileged so you'll need to run as root (bad) or use
     a service wrapper (such as jsvc from Commons Daemon) that binds to
     port 80 as root and then drops privileges
   - Use iptables (or equivalent) to map port 8080 to 80

3. Replace hostname-or-ip with my-webapp
   - This will require a DNS entry that resolves my-webapp to the IP
     address of the machine where Tomcat is running. This is probably
     already set up for the machines host name. If you don't want to use
     that, you can:
     - edit the hosts file on the client (fine for testing)
     - talk to your network administrator about adding an appropriate
       DNS entry

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message