Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 24th January 2008, 16:34
jitendra jitendra is offline
Junior Member
 
Join Date: Jan 2008
Posts: 1
Thanks: 1
Thanked 0 Times in 0 Posts
Question Configure Tomcat port 80 with Plesk

Hi!
I need to configure tomcat on Linux dedicate server only for Java project through Plesk . Following services is running on it.

1.Apache on port 80
2.Tomcat on port 8080/9080
3.Mysql on port 3306

Now problem is this, i need to run only java project on this server from port 80 .this time user type my site name then default page call index.html or .php file from root directory of Apache. so how it can be possible to run java project from this server default port 80 after deploye .war(java project) file to this server. Because user who wants to access my site does not know its port number for Tomcat as here is 9080 and also deploy file name. Pls look below for detail about problem

Suppose my sit name is www.example.com and hosted on Linux dedicate server with Plesk install on it with Apache, Tomcat and Mysql.

Now for running my java project on it, i need to enter www.example.com:9080/java_projrect_name/ in browser. So how can i run this project only from URL www.example.com and it will call default file .jsp from java_project_name directory. I do not want to enter port number and java_project_name in url and my client who wants to access this project did not know about port number as well as project name . He knows only about URL as www.example.com and when he browses it then it should call default page index.jsp from toncat. And in Browser window, it should only show www.example.com. So to implement this what should we need to do? Pls help.

Thanks
Reply With Quote
Sponsored Links
  #2  
Old 24th January 2008, 16:44
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 153 Times in 150 Posts
Default

you can use apache's mod_proxy and mod_proxy_ajp to achieve that.
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
  #3  
Old 24th January 2008, 17:07
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 153 Times in 150 Posts
 
Default

You can setup something like this
Code:
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
ProxyPass / ajp://127.0.0.1:9080/java_project_name
ProxyPassReverse / ajp://127.0.0.1:9080/java_project_name
</VirtualHost>
I have done it in a virtual host such that you can still run other servers on apache.
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
The Following User Says Thank You to topdog For This Useful Post:
jitendra (25th January 2008)
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting e-mail working hansoffate Installation/Configuration 29 13th August 2008 16:33
Error compile Courier-Authlib pcom11 Server Operation 1 29th September 2007 12:15
mail forward problems cruz Server Operation 15 8th September 2007 12:43
My php scripts don't send e-mail html forms. CombatGod Installation/Configuration 5 8th November 2006 10:16
How to install BFD (Brute Force Detection) domino Tips/Tricks/Mods 9 31st March 2006 22:40


All times are GMT +2. The time now is 21:47.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.