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 :


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.


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

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 ?

  • It would help if you could show the httpd configuration, including any rewrites you may have added. (Yes, this can be solved on the httpd level.) – Jenny D Nov 19 '15 at 15:20
  • @JennyD Added links for http conf in question. – amolkul Nov 23 '15 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.