- 积分
- 6
- 威望
-
- 金钱
-
- 注册时间
- 2011-2-26
- 在线时间
- 小时
- 最后登录
- 1970-1-1
|
lnmp1.3 网站根目录可以正常访问php,访问子目录php文件报错no input file specified
.user.ini目录设置正常
子目录访问html文件正常,只有php不能正常显示
网站日志:
49.85.217.1 - - [28/Jul/2016:10:58:54 +0800] "GET /client/cart.php HTTP/1.1" 404 56 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36"
网站配置文件:
server
{
listen 80;
#listen [::]:80;
server_name www.shadowsocks.me shadowsocks.me;
return 301 https://www.shadowsocks.me$request_uri;
index index.html index.htm index.php default.html default.htm default.php;
root /home/shadowsocks;
include wordpress.conf;
#error_page 404 /404.html;
location ~ [^/]\.php(/|$)
{
# comment try_files $uri =404; to enable pathinfo
try_files $uri =404;
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_param HTTPS on;
fastcgi_index index.php;
include fastcgi.conf;
#include pathinfo.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
}
server {
listen 443;
server_name www.shadowsocks.me;
index index.html index.htm index.php;
root /home/shadowsocks;
ssl on;
ssl_certificate shadowsocks.crt;
ssl_certificate_key shadowsocks.key;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
ssl_ciphers ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM; #Disables all weak ciphers
ssl_protocols SSLv3 TLSv1; #enables SSLv3/TLSv1, but not SSLv2 which is weak and should no longer be used.
root@iZ62li3b1hsZ:/usr/local/nginx/conf/vhost# cat shadowsocks.me.conf
server
{
listen 80;
#listen [::]:80;
server_name ;
return 301 https://www..me$request_uri;
index index.html index.htm index.php default.html default.htm default.php;
root /home/shadowsocks;
include wordpress.conf;
#error_page 404 /404.html;
location ~ [^/]\.php(/|$)
{
# comment try_files $uri =404; to enable pathinfo
try_files $uri =404;
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_param HTTPS on;
fastcgi_index index.php;
include fastcgi.conf;
#include pathinfo.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
}
server {
listen 443;
server_name me;
index index.html index.htm index.php;
root /home/shadowsocks;
ssl on;
ssl_certificate shadowsocks.crt;
ssl_certificate_key shadowsocks.key;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
ssl_ciphers ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM; #Disables all weak ciphers
ssl_protocols SSLv3 TLSv1; #enables SSLv3/TLSv1, but not SSLv2 which is weak and should no longer be used.
ssl_prefer_server_ciphers on;
include wordpress.conf;
#error_page 404 /404.html;
location ~ [^/]\.php(/|$)
{
# comment try_files $uri =404; to enable pathinfo
try_files $uri =404;
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS on;
include fastcgi.conf;
#include pathinfo.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log /home/wwwlogs/www..me.log;
} |
|