Nilesh Havire
asked on
Apache and Tomcat together on the same port?
Hi Friends.
We have CetOS 5.5, Im working on setting a server up, that is supposed to be able to parse html, JSP,CGI, SWf.
Im actually quite unexperienced in the use of Tomcat and Apache, since Ive always been working under an Windows platform, along with IIS.
The problem for me when Im setting Tomcat up is that I cant get it to co-work with Apache, so that the regular apache mounted directories (/var/lib/apache/htdocs/) can parse JSP. I would have to connect to port 8080 first, then put my JSP pages under the Tomcat root directories.
So, what I would like some help with is:
How do I get Apache and Tomcat to work together by any connector (on the regular port 80)?
All help appreciated!
We have CetOS 5.5, Im working on setting a server up, that is supposed to be able to parse html, JSP,CGI, SWf.
Im actually quite unexperienced in the use of Tomcat and Apache, since Ive always been working under an Windows platform, along with IIS.
The problem for me when Im setting Tomcat up is that I cant get it to co-work with Apache, so that the regular apache mounted directories (/var/lib/apache/htdocs/) can parse JSP. I would have to connect to port 8080 first, then put my JSP pages under the Tomcat root directories.
So, what I would like some help with is:
How do I get Apache and Tomcat to work together by any connector (on the regular port 80)?
All help appreciated!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Here is exactly the description of you problem:
http://www.klawitter.de/tomcat80.html
So the recommendation is to use a proxy in your case. Using tomcat as an http server might cause side effects with php and huge images. Configuring memory options in Tomcat is anyway a good idea to run smoothly.
Here is a howto to set up your environment (Apache and Tomcat are already done, so just add the proxy part):
http://blog.eventloud.com/2011/04/20/how-to-setup-apache-forwarding-to-tomcat-run-tomcat-on-port-80/
http://www.klawitter.de/tomcat80.html
So the recommendation is to use a proxy in your case. Using tomcat as an http server might cause side effects with php and huge images. Configuring memory options in Tomcat is anyway a good idea to run smoothly.
Here is a howto to set up your environment (Apache and Tomcat are already done, so just add the proxy part):
http://blog.eventloud.com/2011/04/20/how-to-setup-apache-forwarding-to-tomcat-run-tomcat-on-port-80/
ASKER
I have one query, After configuration done, Does I am able to open Application which is in deployed in Apache, Now I can access this by
http://localhost/myapplication -------------------->Apach e
http://localhost:8080/core-web/integrationPage -------------------------> Tomcat
both is on same server
I want this http://localhost/core-web/integrationPage
should be run both Apache & Tomcat
Is it Possible ?
http://localhost/myapplication -------------------->Apach
http://localhost:8080/core-web/integrationPage ------------------------->
both is on same server
I want this http://localhost/core-web/integrationPage
should be run both Apache & Tomcat
Is it Possible ?
ASKER
Hi guys,
I am doing from http://www.dnamique.com/how-to-setup-apache-tomcat-connector-on-linux-centos-5x/
But I am getting error
Starting httpd: httpd: Syntax error on line 993 of /etc/httpd/conf/httpd.conf : Syntax error on line 2 of /etc/tomcat5/jk/mod_jk.con f: Cannot load /usr/lib/httpd/modules/mod _jk.so into server: /usr/lib/httpd/modules/mod _jk.so: cannot open shared object file: No such file or directory
[FAILED]
I am doing from http://www.dnamique.com/how-to-setup-apache-tomcat-connector-on-linux-centos-5x/
But I am getting error
Starting httpd: httpd: Syntax error on line 993 of /etc/httpd/conf/httpd.conf
[FAILED]
ASKER
Thanks for your reply, PHP is on same server, & we have some huge Images & flash in webapps, I can give specific memory to Tomcat, we have 16 GB RAM on Server
My PHP application is working on Apache & I dont want to disturb it.
also Tomcat Installation is done but I want to use Apache and Tomcat together on the same port, I heared from one apache and tomcat play together i thought they interact but dont know how ?
I can get Tomcat page by http:// LINUX-IP:8080,