I'm currently using a unique server to host 2 Java EE applications. The server is a Linux Debian 6, with Apache 2 and Tomcat 6. I'm using mod_jk in order to remove port from url.
Until now, those applications are available on url http://myserver/app1 and http://myserver/app2
I've got some new dns and I want to access to those application with url like http://dnsname1/ and http://dnsname2/
The Apache 2 setup with Named virtual hosts is succesfull and http://dnsname1/ answered well. I need to add the context to reach the application, like http://dnsname1/app1.
But I want to reach the application without adding the context path, like http://dnsname1/
Here is the apache2 virtual hosts config:
NameVirtualHost xxx.xxx.xxx.xxx:80
ServerName myserver
<VirtualHost xxx.xxx.xxx.xxx:80>
ServerName dnsname1
ServerAdmin me@mydomain.fr
DocumentRoot /app1/www
ErrorLog /app1/logs/app1_errors.log
CustomLog /app1/logs/app1_access.log combined
LogLevel warn
JkMount /app1 ajp13
JkMount /app1* ajp13
JkLogFile /app1/logs/app1-mod_jk.log
JkLogLevel debug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
</VirtualHost>
<VirtualHost xxx.xxx.xxx.xxx:80>
ServerName dnsname2
ServerAdmin me@mydomain.fr
DocumentRoot /app2/www
ErrorLog /app2/logs/app2_errors.log
CustomLog /app2/logs/app2_access.log combined
LogLevel warn
JkMount /app2 ajp13
JkMount /app2* ajp13
JkLogFile /app2/logs/app2-mod_jk.log
JkLogLevel debug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
</VirtualHost>
Somebody could tell me how to set up my virtual host?