I have configured a server where lies several domains, and more than one of them have a ajp13-worker associated to it. The configuration file looks like that:
<VirtualHost *:80>
ServerAdmin my@email
ServerName mydomain
ServerAlias www.domain
DocumentRoot /home/kleber/www/loja
JkMount /app* ajp13_worker
...
</VirtualHost>
when I deploy some webapps like appOne.war
and appTwo.war
to my tomcat webapps directory, I can access them using something like that: https://mydomain/appOne
and https://mydomain/appTwo
.
How I could configure the mod-jk
plugin with the tomcat
and apache
to allow me access some of this webapps as https://mydomain/
only? In a way I could define one webapp per domain using the mod-jk
ajp13-worker to be the root path, and allowing me continuing to access the webapps appOne.war
and appTwo.war
as before.
update
<VirtualHost *:80>
ServerAdmin ...
ServerName ...
ServerAlias ...
DocumentRoot /home/kleber/www/loja
JkMount /app* ajp13_worker
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =... [OR]
RewriteCond %{SERVER_NAME} =...
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>