I have an apache server whose main purpose is to handle RPC requests. All such requests hit a url that begins with a fixed prefix (e.g., /rpc) I use a Location directive to set the handler for this URL (e.g., <Location /rpc>...</Location>).
I'd now like this server to also serve static files. I put an index.html file into its DocumentRoot but cannot get apache to serve it to me. Instead, I get 404 responses. The access log shows this:
127.0.0.1 - - [18/Aug/2010:11:41:52 -0400] "GET /index.html HTTP/1.1" 404 208
The error log shows this:
[...] [error] [client 127.0.0.1] File does not exist: /www/htdocs/index.html
This error message is a filthy lie. I can copy and paste that path and run ls /www/htdocs/index.html and see that the file does indeed exist.
Things I have tried so far:
- Checked all permissions in full path to the file: all dirs are 755, all files are 644
- Checked ownership: all dirs and files are owned by the same user that apache is running as
- Set
LogLevel debug(no new messages appeared in the logs) - Added a
<Location />block with aSetHandler default-handlerdirective - Added a
<Location /index.html>block with aSetHandler default-handlerdirective - Moved both of these
Locationblocks above and below the<Location /rpc>block - Ran
dtrussand did not see apache issue a singlestat()call while processing the request
I'm running out of ideas. What else should I try?
(I'm using apache 2.2.12 on Mac OS X 10.5.8 and apache 2.2.3 on CentOS 5.4.)