everyone
I made a web application by Apache Click Framework, and just throwed it into tomcat behind httpd.
(assume my domain name is www.domain.com.) So I can access my app by the URL: www.myDomain.com/myApp/pages/login.htm
My questions is, how to remove the "myApp" part in this url by configuration in httpd or tomcat? because my domain name already has some words like "myApp".
Simply name your war file root.war
and deploy it to tomcat.
You probably have to remove the preconfigured ROOT/
directory in tomcat first, if it exists.
You need to do URL rewriting which most of framework supports like struts, spring mvc, that you can configure in your web.xml in case of java web app
Please Check if you can do with tomcat server.xml in below way ( But I am not sure with this, URL rewriting will solve your problem)
Refer: http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html.
etc/hosts to add something like below
127.0.0.1 mydomain.com
server.xml changes
<Host name="bbstats.localhost" appBase="webapps/myapp"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
</Host>
<Context path="/myapp" docBase="bbstats" debug="5" reloadable="true" crossContext="true">
</Context>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With