I have webapps based on restful webservices running on : Apache httpd + mod_jk + Tomcat 6 + Jersey on Centos 6.
The webservice urls r of format :
http://<ip-addr>/application/domain/<domain-name>/user/<user-id>?properties=<propertyname>
The webservices work correctly under normal circumstances. However, if the the user id has a value ending with .pl then I get a 404 error.
Eg.
http://192.168.0.17/application/domain/test.dom/user/amol.pl?properties=firstname
In httpd error_log, I get error : File does not exist: amol.pl
So it seems that httpd is not forwarding the request to tomcat, instead it is looking for the file amol.pl.
I executed the webservice directly on tomcat by doing
http://192.168.0.17:8080/application/domain/test.dom/user/amol.pl?properties=firstname.
It worked correctly.
I'm not an expert in apache httpd configuration, so I tried some random tricks to tell httpd to ignore .pl files, with help from google, but could not get it working.
Foll things did not work :
- Remove the "application/x-perl pl" line from /etc/mime.types file.
- Change ExecCGI to -ExecCGI.
- Remove the perl.conf file from /etc/httpd/conf.d
- Add explicit line JkMount /application/*.pl ajp13
But now the problem is I cannot ignore .pl files bcos we do have some .pl files.
httpd.conf is available at http://pastebin.com/PKwutE1H
.
Virtual host conf file is available at http://pastebin.com/gNMEyuMh
Am I correct in understanding that the problem is in httpd configuration ? Can the problem be solved at httpd level at all ?