Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 from java_project directory. So to implement this what should we need to do?

share|improve this question
    
Do you want to integrate Apache2 and Tomcat6 together ? As running Tomcat6 on privileged port 80 is highly not recommended. –  Abhijeet Kasurde Oct 29 '12 at 1:51
    
For more info refer SO question stackoverflow.com/questions/5544713/… –  Abhijeet Kasurde Oct 29 '12 at 2:03
    
I tried it with the help of Virtual Host in <b>httpd.conf <b> –  AJIT RANA Oct 29 '12 at 12:07
    
my server.xml in tomcat is <br/> <code><Connector port="9080" maxThreads="15" minSpareThreads="5" maxSpareThreads="75" enableLookups="true" acceptCount="10" connectionTimeout="20000" disableUploadTimeout="true" /><Engine name="PSA" defaultHost="localhost"><Host deployXML="true" name="DOMAIN.com" appBase="psa-webapps/DOMAIN.com" unpackWARs="false" autoDeploy="true" liveDeploy="true"> <Context crossContext="false" reloadable="false" useNaming="true" swallowOutput="false" privileged="true" docBase="/usr/share/tomcat6/webapps/manager" cookies="true" path="/manager" cachingAllowed="true"/> –  AJIT RANA Oct 29 '12 at 12:37
    
MY VIRTUAL HOST IS <pre> <VirtualHost *:80> ServerName www.DOMAIN.com ServerAlias DOMAIN.com *.DOMAIN.com # DocumentRoot /usr/share/tomcat6/worl/PSA/DOMAIN.com ProxyPass /usr/share/tomcat6/work/PSA/DOMAIN.com ajp://www.DOMAIN.com:9080/WEBAPP </pre> –  AJIT RANA Oct 29 '12 at 12:38

1 Answer 1

A simple solution, if you cannot remove apache or get apache to forward certain requests to Tomcat is to set up forwarding. For instance, I have a directory path of nciml.org forward to my web app on port 8080. Easy to set up and works great. You can also have a sub domain forward to our application. I did this using GoDaddy.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.