When a directory request is received, apache sends only the directory name
to the proxy fcgi, not the file name, even though the DirectoryIndex
directive is set (and working correctly in a basic config).  A critical
problem as http://www.example.com gives "file not found" or "no input file
specified" errors.

This seems to be an issue with DirectoryIndex and apache rather than
something specific to the proxy module. I am guessing the problem is that
DirectoryIndex is bypassed when a proxy is included. I have tried putting
"DirectoryIndex index.php" in every possible location, testing with
ProxyPass, ProxyPassMatch, and ReWrite rules in various sections (Location,
Directory, VirtualHost) -- all tests having same problem.

Testing with apache 2.4, I can always get apache to serve regular files to
the proxy, but not the specified DirectoryIndex file (index.htm or
index.php). For the root directory, it sends an empty string:

      proxy_fcgi:trace1] [pid 1620:tid 139973627950848] util_script.c(599):
[client 186.108.136.84:44199] Status line from script '': 404 Not Found

Testing with minimal httpd.conf:

  ServerRoot "/usr/local/apache"
  Listen 80
  User nobody
  Group staff
  ServerName myserver.com:80
  LoadModule unixd_module modules/mod_unixd.so
  LoadModule authz_core_module modules/mod_authz_core.so
  LoadModule rewrite_module modules/mod_rewrite.so
  LoadModule dir_module modules/mod_dir.so
  LoadModule proxy_module modules/mod_proxy.so
  LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
  LoadModule log_config_module modules/mod_log_config.so
  DocumentRoot /usr/local/apache/www/
  DirectoryIndex index.php
   <Location / >
     ProxyPass
fcgi://socket=%2fusr%2flocal%2fphp-fpm%2fvar%2frun%2ffpm-php.sock/usr/local/apache/www/
   </Location>
ErrorLog "|/usr/bin/cronolog /usr/local/apache/logs/lexpert-error.%U-%Y.log"
CustomLog "|/usr/bin/cronolog /usr/local/apache/logs/lexpert.%U-%Y.log"
combined
LogLevel trace2


I have tried with the standard
fcgi://127.0.0.1:9000/usr/local/apache/www/$1as well. I started off
using the basic instructions at
http://wiki.apache.org/httpd/PHP-FPM. (Currently testing with php-5.4.7)

Every test has had the same problem with DirectoryIndex.

Any suggestions appreciated.

Thanks in advance,

J.L. Hill

[Running on Debian Squeeze]

Reply via email to