• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Running Tomcat on port 80

M

Mani-Web

Guest
Hi,

I have a customer who start using Tomcat for some of his websites. We managed to get everything working for him (MySQL access, permissions, etc.).

Now, he wants to get rid of the port number 9080 when he runs his JSP applications. Currently, the default page is:
Code:
http://www.yourdomain.com:9080/yourwebapp
How can we setup for him something like:
Code:
http://www.yourdomain.com/yourwebapp
Thank you.

-DS

Infos on the server: RHE 3, Plesk Reloaded 7.5.1, Apache 2, MySQL 4, tomcat 4
 
Hi,

I have some customers running Tomcat applications on my server. They can access their pages using 9080 and even without using the portnumber, if extension is "jsp". Tomcat catches these sites, no matter if the portnumber is present or not.

Regards,
Bart
 
Thank you Bart for your reply.

I tried my self without the port number but I got a 404 File Not Found page!

Did you setup any redirection or something specific to Tomcat on your server for the .jsp files?

Thank you.
 
To run Tomcat over port 80, you have (2) choices:

Disable apache and edit server.xml to use port 80.

Use the mod_jk connector to forward jsp requests through Apache to Tomcat. This is the best setup, but can be notoriously difficult to get working (my experience, anyway).

http://jakarta.apache.org is a good place to start.
 
Thank you for your reply.

I read almost everything on the http://jakarta.apache.org website. But, unfortunately, they do not provide help for specific Control Panels like Plesk.

Originally posted by ideawire_bb
Disable apache and edit server.xml to use port 80.
This alternative is not possible. The other customers on the same server need Apache, not all of them use Tomcat.
Also, I cannot edit server.xml because it overwritten automatically by Plesk.

Originally posted by ideawire_bb
Use the mod_jk connector to forward jsp requests through Apache to Tomcat. This is the best setup, but can be notoriously difficult to get working (my experience, anyway).
According to SW-Soft, Plesk does not use mod_jk. It uses mod_webapp:
http://faq.sw-soft.com/index.php?ToDo=view&questId=160&catId=37

There should be an other alternative to do this with Plesk 7.
 
Ah, running it within the Plesk framework? Sorry, I won't be much help.

I wonder why they elected to use mod_webapp. It's use is disappreciated and everything is moving over to mod_jk.

Sounds like an opportunity for 4PSA.
 
In my vision ou have more 2 options :)

1. rewrite rule ... when connections came to por 80 the rewrite reidect to 9080.

2. vhost.com directives placed under /conf/ of every domain..the problem is..adjust the configuration.

actualy I have this problem to run ZOPE/Plone, I put one todo list how install these packs under plesk, but no one came with the answer

Tia
 
Redirection from port 9080 to port 80 should be specific to JSP files. The problem is where I should rewrite these rules when you have Tomcat and Plesk 7?!!

The idea of the vhost file sounds good, I will test it...

Thank you.
 
I'm a bit late into this thread.

If you use Plesk's tomcat interface to load the webapp 'yourwebapp.war' into yourdomain.com then you should be able to access it through apache to tomcat using http://www.yourdomain.com/yourwebapp.

Plesk sets up a webappdeploy in the domain's httpd.include to redirect /yourwebapp to tomcat.

Bill
 
Have a look at
/home/httpd/vhosts/yourdomain.com/conf/httpd.include
Make sure it has WebAppConnection and WebAppDeploy. The deploy should be something like
WebAppDeploy "yourwebapp" yourdomain_com_Connection "/yourwebapp/"

If this is ok, then I would check tomcat's server.xml, web.xml and the webapps web.xml (in particular contexts and servlet mappings)

Bill
 
Back
Top