0
votes

my purpose is to connect the httpd web server and the eclipse tomcat application server. I configured the tomcat server inserting in the server.xml the following line:

<Connector port="8009" protocol="AJP/1.3" enableLookups="false" redirectPort="8443"/>

I copied the mod_jk.so file into the httpd modules folder, I created into the conf folder the workers.properties file, which contains the following lines:

worker.list=myworker
worker.myworker.type=ajp13
worker.myworker.host=localhost
worker.myworker.port=8009

I added into the httpd.conf file the following lines:

LoadModule jk_module modules/mod_jk.so

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

JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories

Alias /testApacheTomcat "C:/Data/testApacheTomcat/"

<Directory "C:/Data/testApacheTomcat/">
    AllowOverride None
    Allow from all
</Directory>

<Location /*/WEB-INF/*>
    deny from all
</Location>

JkMount /testApacheTomcat/* myworker

and I started both Tomcat and Httpd.

Bot tomcat server and HTTPD are correctly started (if I ask for

http://localhost:8080/testApacheTomcat/

I see my app and if I ask for

http://localhost/

I see the HTTPD welcome page), but they don't communicate (if I ask for

http://localhost/testApacheTomcat/ 

I receive a 404 page not found). What am I doing wrong?

Thanks so much

1

1 Answers

0
votes

You need to remove the Alias and Directoy tags, this will be handled automatically. Therefore the Location tag is unnecessary too. Also add this line to you jk mounting:

JkMount /testApacheTomcat myworker

Then you shoul be able to access:

http://localhost/testApacheTomcat/