Hi,
I’m having a great deal of trouble when trying to get Apache and mod_jk to work with Tomcat.
I have 2 Sles12 server, one with Apache and mod_jk installed and another with Apache and Tomcat.
I have verified the that Apache works on server one and that I’m able to access Tomcat pages on server two.
So separately everything works.
Then I want server one to be my “frontend” for Tomcat and therefore i have tried to configure mod_jk.
So far have I installed mod_jk, verified that it’s loaded in to Apache and created and modified some config files…
Here is my config files
httpd.conf:
[CODE]…
Tomcat server configuration
Include /etc/apache2/mod_jk/mod_jk.conf[/CODE]
mod_jk.conf:
[CODE]JkLogFile /var/log/apache2/mod_jk.log
JkWorkersFile /etc/apache2/mod_jk/workers.properties
JkShmFile /etc/apache2/mod_jk/mod_jk.shm
The following line makes apache aware of the location of
# the /showcase context
Alias /sample "/srv/tomcat/webapps/sample"
<Directory "/srv/tomcat/webapps/sample">
Options Indexes FollowSymLinks
Require all granted
</Directory>
Set the jk log level [debug/error/info]
JkLogLevel debug
Select the timestamp log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JK mount
#JkMount /sample worker1
JkMount /.jsp worker1
JkMount /sample/ worker1[/CODE]
workers.properties:
worker.list=worker1
worker.worker1.port=8009
worker.worker1.host=sles12-lamp
worker.worker1.type=ajp13
Since it’s my own test environment i have disabled firewalls and i have verified the communications between the servers, including adding host names to my local host file.
Cheers
Björn