Hello! It's been a while since I was on the mailing list (I know I'm posting from the forum!), but I'm using nginx once again for all of my sites. Now, I have a peculiar problem.
I have a bunch of sites that work great with nginx + php-fastcgi and I have no complaints there! The only thing that doesn't work is a PHP gallery application called Gallery3. Sadly, I have to use Apache with this application. The problem I have is as follows:
http://gallery.wfto.cc -- Doesn't work (downloads an unnamed file containing the PHP code of index.php because it isn't getting parsed)
http://gallery.wfto.cc/ -- Doesn't work (downloads an unnamed file containing the PHP code of index.php because it isn't getting parsed)
http://gallery.wfto.cc/index.php -- Doesn't work (downloads an unnamed file containing the PHP code of index.php because it isn't getting parsed)
http://gallery.wfto.cc/index.php/ -- Works.
I have no idea what is going on. I included most of my configurations below. The /etc/nginx/conf.d/proxy.conf is a ... general proxy configuration, nothing special.
I set up nginx as a reverse proxy for apache as follows:
server {
listen 80; ## listen for ipv4
listen [::]:80 default ipv6only=on; ## listen for ipv6
root /var/www/vhosts/wfto.cc/subdomains/gallery;
server_name gallery.wfto.cc;
access_log /var/log/nginx/gallery.wfto.cc.access.log;
location / {
proxy_pass http://127.0.0.1:9001;
include /etc/nginx/conf.d/proxy.conf;
}
}
I'm using Apache2 with mod_fastcgi. Relevant Apache configuration:
<VirtualHost *:9001>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/vhosts/wfto.cc/subdomains/gallery
<IfModule mod_fastcgi.c>
AddHandler php5-fcgi .php
Action php5-fcgi /php5-fcgi
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization
</IfModule>
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/vhosts/wfto.cc/subdomains/gallery/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>