Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 06-20-2011, 04:14 AM   #1
Registered: Jun 2011
Posts: 40

Rep: Reputation: Disabled
Associate a Tomcat context to a domain name

Hi !

I've got a server that runs on Ubuntu Server 11.04 amd64.

I've installed Tomcat 6 and Apache 2 servers.

On Tomcat, I installed Liferay portal as a WAR.
I can access to my portal with the following address :

I would like to associate a domain name to the "/lportal" context so that I could access my webapp with the "" URL.
To make it short, I'd like to access the webapp on "http://localhost:8080/lportal" with "".

How can I do that please ?

Thank you !

Old 06-20-2011, 10:01 PM   #2
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,125

Rep: Reputation: 165Reputation: 165
I usually have more than web app on a server so I haven't had to do this for a while. IIRC, you can do it by removing or renaming the root web app (mv /usr/local/apache-tomcat/webapps/{ROOT,OLDROOT}) and setting up your app as ROOT instead of portal.

The other thing you'll need to do is set up DNS (or hosts files) so that other boxes can resolve your domain.
Old 06-21-2011, 02:47 AM   #3
Registered: Jun 2011
Posts: 40

Original Poster
Rep: Reputation: Disabled
I've did as you said and it works fine.

I also have found here that we should do what I want to by adding a Host in Tomcat's server.xml. But it don't seems to work when Tomcat is used via Apache.

Is anyone has something that can answer to my first question ?

Last edited by pmorin; 06-21-2011 at 03:01 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Session replication using apache+mod_jk+tomcat(5.5.28-veriosn of tomcat) sreejithp Linux - Server 1 12-24-2010 06:46 AM
trouble getting a domain name to associate with the server usallsys Linux - Server 1 11-23-2007 10:54 PM
How to associate my IP with a domain name? ManOnTheDollar Linux - Server 7 09-10-2007 08:23 AM
TOMCAT init script not working on startup -- tomcat 4.x / Mandrake Linux 8.0 jmartinph Mandriva 0 03-08-2004 01:31 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:37 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration