Solano
Solano

Reputation: 550

How to deploy a java application as root in tomcat without allow access to other webapps

I have a java application.war and I copied the file to tomcat7/webapps directory.

I'm able to access it with www.application.com/application (My domain points to ip 200.xyz.12.jk:8080) BUT

I want to access it through www.application.com (without the name of the folder inside webapps directory)

Also i dont want to allow access to other folders inside webapps.

I have tried some topics but didnt succeed.

Failed to help: Deploying my application at the root in Tomcat

https://josefbetancourt.wordpress.com/2011/02/12/tomcat7-change-root-app/

Tomcat 6: How to change the ROOT application

Thank you so much

Upvotes: 0

Views: 189

Answers (1)

Ruslan
Ruslan

Reputation: 126

Place your tomcat under apache http server then point it to tomcat's AJP protocol.

Example of Apache httpd.conf configuration:

Listen 80
ProxyPass / ajp://application.com:8009/application

In tomcat server.xml file you should have below ajp connector:

<Connector port="8009" protocol="AJP/1.3" />

As a result www.application.com/ url points to the application entire directory over ajp protocol.

Hope this will help you.

Upvotes: 1

Related Questions