nginx 1.6别名+;Debian 8上的php5 fpm=404
我对Debian 8 jessie(1.6版)和php5 fpm附带的nginx有一个问题。这是我在Debian 7 wheezy附带的nginx 1.2上的工作配置示例,但是,它在1.6上不工作nginx 1.6别名+;Debian 8上的php5 fpm=404,php,nginx,phpmyadmin,Php,Nginx,Phpmyadmin,我对Debian 8 jessie(1.6版)和php5 fpm附带的nginx有一个问题。这是我在Debian 7 wheezy附带的nginx 1.2上的工作配置示例,但是,它在1.6上不工作 server { listen 80; server_name localhost; location / { try_files $uri $uri/ /error.html; include php.fast.conf; }
server {
listen 80;
server_name localhost;
location / {
try_files $uri $uri/ /error.html;
include php.fast.conf;
}
location /phpmyadmin {
alias /usr/share/phpmyadmin;
include php.fast.conf;
}
}
这是我的php.fast.conf
location ~ \.php$ {
fastcgi_split_path_info ^(.+?\.php)(/.*)?$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
Debian8上的情况发生了很大的变化,我修改了股票配置以运行PHP,如果phpinfo位于/var/www/html中,一个显示phpinfo的PHP脚本就可以工作
server {
listen 80;
root /var/www/html;
index index.html index.htm index.php index.nginx-debian.html;
server_name localhost;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
location /phpmyadmin {
alias /usr/share/phpmyadmin;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
}
}
但是不起作用(404),尝试了很多选项只得到404/空白页/未指定的输入文件。我认为这是一个fastcgi_param问题,但不知道如何解决它
此外,一个工作配置在升级后将无法工作,对所有这些进行更改的原因是什么 我一直在写代码
location /phpmyadmin {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
include snippets/fastcgi-php.conf;
root /usr/share/;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_intercept_errors on;
}
location ~* ^/phpmyadmin/(.+\.(jpeg|jpg|png|css|gif|ico|js|html|xml|txt))$ {
root /usr/share/;
}
}
location /phpMyAdmin {
rewrite ^/* /phpmyadmin last;
}