apache下的php网站改成nginx,除了主页之外,访问其他目录404!
这是日志: "POST /rankctr/index.php?m=Api&c=DynamicPackage&a=checkUpdate HTTP/1.1" 404 27 "-" "Apache-HttpClient/Android" "POST /brush/index.php?/get/config HTTP/1.1" 404 27 "-" "Apache-HttpClient/Android""POST /rankctr/index.php?m=Api&c=DynamicPackage&a=checkUpdate HTTP/1.1" 404 27 "-" "Apache-HttpClient/Android"
"-" 400 0 "-" "-"
"POST /rankctr/index.php?m=Api&c=DynamicPackage&a=checkUpdate HTTP/1.1" 404 27 "-" "Apache-HttpClient/Android"
"POST /notify/index.php/notify/params HTTP/1.1" 404 168 "-" "Dalvik/1.6.0 (Linux; U; Android 4.2.2; Spice Mi-504 Build/JDQ39)"
sites.conf配置文件:
server {
listen 80;
allow all;
server_name top.droidtopone.com;
access_log /logs/nginx/top.droidtopone.com_access_log;
error_log /logs/nginx/top.droidtopone.com_error_log;
root /data/www;
location / {
index index.php;
}
# if ($fastcgi_script_name~* \..*\/.*php) {
# return 404;
# }
location ~ \.php$ {
fastcgi_pass unix:/tmp/php-fpm.socket;
fastcgi_indexindex.php;
fastcgi_paramSCRIPT_FILENAME /data/www$fastcgi_script_name;
include fastcgi_params;
}
}
location ~ \.php$ {
root /mnt/wwwroot;
fastcgi_pass 127.0.0.1:9000;
fastcgi_indexindex.php;
fastcgi_paramSCRIPT_FILENAME$document_root/$fastcgi_script_name;
include fastcgi_params;
}
这个是我的配置 kk8412 发表于 2015-12-2 10:53
location ~ \.php$ {
root /mnt/wwwroot;
fastcgi_pass 127.0.0.1:90 ...
这个貌似不行吧! kk8412 发表于 2015-12-2 10:53
location ~ \.php$ {
root /mnt/wwwroot;
fastcgi_pass 127.0.0.1:90 ...
每次修改配置都要重启nginx
页:
[1]