I tried to connect Apache2 and Tomcat via jk_mod, but I can't get it to work. When I open a page which is supposed to be redirected to an application, I fall on my "normal" Apache HTTP 404 page. The thing is that everything seems to be correctly configurated since I don't see any error on any log (Apache is fine, jk_mod is fine and Tomcat is fine too)... And I know that everything is loaded because if I change my JkMount line then I have an error in mod_jk.log.
Here is a part of my VirtualHost :
NameVirtualHost *:443
<VirtualHost *:80>
ServerName xx
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/>
Options -Indexes FollowSymLinks MultiViews -ExecCGI
AllowOverride All
Order allow,deny
allow from all
</Directory>
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_USER_AGENT} !Java
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
</VirtualHost>
<VirtualHost *:443>
ServerName xx
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/>
Options -Indexes FollowSymLinks MultiViews -ExecCGI
AllowOverride All
Order allow,deny
allow from all
</Directory>
SSLEngine on
SSLCertificateFile xx
SSLCertificateKeyFile xx
SSLCACertificateFile xx
JkMount /LaunchMyCraft/* ajp13_worker
</VirtualHost>
And here is the loaded workers file :
workers.tomcat_home=/usr/share/tomcat7
workers.java_home=/usr/lib/jvm/java-7-openjdk-amd64/jre
ps=/
worker.list=ajp13_worker
worker.ajp13_worker.port=8009
worker.ajp13_worker.host=localhost
worker.ajp13_worker.type=ajp13
worker.ajp13_worker.lbfactor=1
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=ajp13_worker
Could you help me ?
Thanks !
You didn't mention what URL you are accessing when you get a 404, but if you are accessing
http://xx/LaunchMyCraft
(without the trailing slash), then this is expected since your JkMount directive maps to/LaunchMyCraft/*
(with the trailing slash).To fix this, change your JkMount mapping to
/LaunchMyCraft*
(no trailing slash).