答案 0 :(得分:0)
确保首先所有文件都归nginx所有,并将运行php-fpm的用户更改为nginx。这将允许这两个文件处理。
还可以尝试将它放在你的nginx配置文件中。
location / {
try_files $uri $uri/ /index.php?q=$request_uri;
}
取代
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}