Join 3,512 readers in helping fund MetaFilter (Hide)


Quoth the server, 404.
August 1, 2008 7:37 AM   Subscribe

Apache and Tomcat strangeness... a page in my app throws a 404... but only when using SSL on a single server.

I am having a very strange problem with one of my applications.

The skinny:

- The app is a Java JSP servlet web app running on a proprietary framework and tag library. It's something like a primitive and wonky version of Struts.

- The problem is that going to a certain page in the app gets a 404 but... ONLY on the test server and ONLY when SSL is used.

- It works fine on my machine locally, on another windows machine running tomcat, on our staging server which is solaris (just like the test box), and on the test box if I go to the HTTP address instead of HTTPS.

- Tomcat's catalina log give nothing strange.

- Apache's error log gives entries like the following:

[Thu Jul 31 10:37:53 2008] [error] [client 10.140.225.162] File does not exist: /usr/local/jakarta-tomcat-4.1.30/webapps/myapp/services, referer: https://mytestserver.ca/myapp/services/services.jsp?selServices=MyServices_f2

response when trying from Firefox:

Not Found

The requested URL /sao/services/changeRequestType was not found on this server.

Apache/2.0.49 (Unix) mod_jk/1.2.5 mod_ssl/2.0.49 OpenSSL/0.9.7d PHP/5.0.4 Server at mytestserver.ca Port 443




It looks to me like it is trying to find a /myapp/services/ folder? This folder of course does not exist. That URL ( /services/*) is mapped in my web.xml and has worked fine until now.


I do not have direct access to the servers in question, as I am only the developer. My knowledge of apache and tomcat configuration is very limited.

To my mind, the key question is why does it work on port 80, but not 443? Surely this must be a server config issue?

Any assistance is greatly appreciated and will save me from wasting more time spinning my wheels on this. I have googled to the best of my fu and have turned up nothing.
posted by utsutsu to Computers & Internet (6 answers total)
 
Have you asked the admins to compare the server.xml file from the working servers to that used on the test server?
posted by jma at 8:09 AM on August 1, 2008


sounds like a problem in the "virtual host" config for the ssl. apache is a bit of a pig to configure. the ssl configuration is probably a logically separate (virtual) server. that virtual host needs to be configured correctly to allow access to your app. from what i can understand of the above, it looks like that configuration is wrong.

don't see how you can fix it - it's an admin issue.
posted by not sure this is a good idea at 8:20 AM on August 1, 2008


I looks like apach is attempting to serve a you tomcat servlets as files. The usual way to get apache to server tomcat content is via an AJP connection. Apache should do all the SSL and pass normal requests to tomcat over this AJP connection.

Compare the httpd.conf on the production server and the test server. There should be a VitraulHost or Locatin directive with something about JKMount. I'd guess that the production server is missing this.
posted by bdc34 at 8:59 AM on August 1, 2008


I can't help, but I just wanted to say that the title of your post is awesome.

GL with the actual subject of you post!
posted by singerdj at 9:29 AM on August 1, 2008


jma: I am working on getting the infrastructure guys to compare the settings between servers, thanks for that.

not sure / bdc34: Sounds likely to me, I have sent this issue up to the infrastructure guys and hopefully they will solve this. both of your comments definitely have given me a solid direction to go in.

singerdj: I can't claim originality on this one.
posted by utsutsu at 1:07 PM on August 1, 2008


Thanks all!

I was able to get the test admin and production admin to compare configs and sure enough they found a missing line.

Thanks MeFi, you put me on the right track.
posted by utsutsu at 1:36 PM on August 1, 2008


« Older Can I buy an iPhone in Canada ...   |  I am looking for opinions on w... Newer »
This thread is closed to new comments.