I have followed the instructions on this link http://www.avajava.com/tutorials/lessons/how-do-i-connect-apache-to-tomcat-using-the-mod-jk-module.html?page=1 to connect apache to tomcat and i am able to call a jsp page from apache via mod_jk. However the jsp is shown as plain text file when i issue the following url http://localhost/alg3eng/index.jsp. When i call http://localhost:8085/alg3eng/index.jsp, the page is rendered correctly. Where am doing it wrong?

I added the following in httpd.conf

LoadModule jk_module C:/Apache24/modules/mod_jk.so

<IfModule jk_module>

    JkWorkersFile C:/Apache24/conf/workers.properties
    JkLogFile C:/Apache24/logs/mod_jk.log
    JkLogStampFormat "[%b %d %Y - %H:%M:%S] "
    JkRequestLogFormat "%w %V %T"
    JkLogLevel info

    JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories

    Alias /alg3eng "C:/tomcat/webapps/alg3eng/"

    <Directory "C:/tomcat/webapps/alg3eng/">
        AllowOverride None
        Require all granted
    </Directory>

    <Location /*/WEB-INF/*>
        Require all denied
    </Location>

    JkMount /alg3eng/*.jsp worker1

</IfModule>

and i have my workers.properties file as follows:

# Define 1 real worker using ajp13
worker.list=worker1
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8019
1

There are 1 answers

2
Seshagiri Sriram On

I am a little rusty on this, but you may want to remove the Alias and Directory directives and just go with the JKMount directive.