LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 06-20-2011, 05:14 AM   #1
pmorin
Member
 
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 :
http://localhost:8080/lportal

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

How can I do that please ?

Thank you !

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

Rep: Reputation: 162Reputation: 162
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, 03:47 AM   #3
pmorin
Member
 
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 04:01 AM.
 
  


Reply


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 07:46 AM
trouble getting a domain name to associate with the server usallsys Linux - Server 1 11-23-2007 11:54 PM
How to associate my IP with a domain name? ManOnTheDollar Linux - Server 7 09-10-2007 09:23 AM
TOMCAT init script not working on startup -- tomcat 4.x / Mandrake Linux 8.0 jmartinph Mandriva 0 03-08-2004 02:31 AM


All times are GMT -5. The time now is 06:47 PM.

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