show subdomain as url for tomcat application

October 12, 2015 1.2k views
Apache Deployment DNS


i have many projects in tomcat webapps folder. say my webapps has project1.war and proejct1 folder, project2.war and project2 folder
i have also created subdomain and and redirected to respective folder
so when i type in url, browser automatically goes to project1
but the url now shows my droplet/project1
my requirement is that the url should show

my apache conf file is

<VirtualHost *:80>
ProxyPreserveHost On

# this will pass all the requests from httpd to tomcat7
     ProxyPass / ajp://localhost:8009/ 
     ProxyPassReverse / ajp://localhost:8009/  

my tomcat server.xml

   <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">


how can i achieve this

Thanks and Regards,
Pranav C Lunavat