0

I've got virtual hosts running on Apache with Tomcat running for JSP pages. Tomcat is runnign as the tomcat user, with a nobody group. There are files generated by Tomcat that get created as the tomcat:nobody user but then these files cannot be found by apache to serve them to the web user, so I get 404 errors.

NOTE: The JSPs are working correctly. It is the files created by Java that then are not accessible.

If I manually change the tomcat:nobody files to webuser:webuser (or whatever the virtual host user is), then apache finds the files. However, this obviously cannot be done manually for an on-demand process.

How can I get these automatically generated files to load via Apache if they are created inside tomcat?

Dan
  • 233
  • 1
  • 2
  • 10

1 Answers1

-1

You need to use the tomcat ajp connector, mod_jk.

See http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html

tom
  • 2,704
  • 16
  • 28
  • Thank you for your reply -- The connector is working as JSPs run fine. It's the files created from within the JSP/Java engine that then cannot be found by apache. – Dan Nov 07 '13 at 04:35
  • Ah, I see. I guess you'll have to generate them with permissions that allows apache to read them. See http://stackoverflow.com/questions/664432/how-do-i-programmatically-change-file-permissions – tom Nov 07 '13 at 04:41