My application is based on PHP
. Now I want to integrate a web-reporter which is written in JSP
. So, I have an Apache HTTP Server
and an application written in PHP. I even installed Tomcat
to serve JSP
files and it is running well at 8080 port. I also got mod_jk.so and added a line LoadModule jk_module modules/mod_jk.so
to httpd.conf
file, but still I can't run JSP
files from my application folders (port 80). I guess, there should be extra tuning of httpd.conf
file, but I do not know, what exactly should be done.
EDIT
My workers.properties
looks exactly like this
JkWorkerProperty worker.list=ajp13w
JkWorkerProperty worker.ajp13w.type=ajp13
JkWorkerProperty worker.ajp13w.host=localhost
JkWorkerProperty worker.ajp13w.port=8009
My uriworkermap.properties
looks like this
/jsp/*=ajp13w
where jsp
is a folder in htdocs, containing jsp files
And finally, my httpd.conf
now contains
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule jk_module modules/mod_jk.so
#AddModule mod_jk.c
#JkWorkersFile C:/Program Files/Apache Software Foundation/Tomcat 6.0/conf/workers.properties
#JkMountFile C:/Program Files/Apache Software Foundation/Tomcat 6.0/conf/uriworkermap.properties
JkLogFile C:/Apache/logs/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
Each commented line makes it impossible to start the server.
EDIT
I installed a newer version of Tomcat - Tomcat 8.0, but the problem remains unsolved.
EDIT
Judging by this link apache.org, the problem can be solved by changing server.xml
(of tomcat) and some changes of httpd.conf (concerning virtual host). But as allways in this world, this article does not provide any concrete examples.
EDIT
I moved one step ahead. The most stupid error which made it impossible to run the server was quotes. So this line in httpd.conf
- JkWorkersFile C:/Program Files/Apache Software Foundation/Tomcat 8.0/conf/workers.properties
gave me an error, but after three hours of struggle it turned out, that it should be JkWorkersFile "C:/Program Files/Apache Software Foundation/Tomcat 8.0/conf/workers.properties"
. So, now it runs. However, when I go to localhost/jsp/index.jsp
I now see an Apache Tomcat error report
: HTTP Status 404 - /jsp/index.jsp
. This seems to be the last error, but still I do not know how to deel with it.
EDIT
Now I see it works. Though, I get an unexpected behaviour. I thought I could place JSP
files inside htdocs folder, but as it turned out, they should be placed inside tomcat.