Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

install tomcat on server with apache  RSS feed

Andrea Rossi
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a problem, sorry if it seems stupid but I really don't know what to do after some days of not helpful googling.
The company I work for has a website realized in such a way that is not possible to modify, so, needing new functionalities we decided to realize a new indipendent website for these.
I realized it with java technology, then I tried to put it online.
The problem is that the hosting company provide a linux server (centos distribution), where apache has been installed by a previous webmaster. now, I need to install tomcat, integrate it with apache (I think by using mod_jk module), then configurate both of them in a specific way for having this behaviour:
typing the url http://www.company_name/ go to the old website,
typing the url http://www.company_name/new_app/ go to my new java website.
How is possible such a thing?
All online guides mainly say:
1)install tomcat
2)install mod_jk
3)modify tomcat and apache creating a specific vhost for your application.
Simple, in theory, but i'have had some problems.
About 1)I have installed tomcat using yum and it seems to work, but I don't know how to connect to his main page.
About 2)Then, I have tried to install mod_jk, downloading source code and trying to create the .so file. It gives an error with the make install that for me doesn't make sense, because says permession denied for an operation done as root.
About 3) I don't have any idea about how to do it.
Can you help me in some way, also linking me to some guides which procedure worked with similar systems?
Thanks a lot.
Guy deLyonesse
Ranch Hand
Posts: 200
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm doing something similar right now.

You should probably avoid mod_jk. It's not supported anymore and that functionality is now handled by mod_proxy_ajp.

Once installed, you will need to load the module in your httpd.conf file.

Then you'll need a line to direct your URL to the apropriate Tomcat application:

And be sure that the <Connector> in your Tomcat's server.xml file related to port 8009 and the AJP protocol is uncommented. (It's commented out in server.xml by default, I believe.)

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!