出错码:500
出错日志:rewrite or internal redirection cycle while internally redirecting to "/index.html", client: 192.168.190.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "192.168.190.142"
解决办法:修改/etc/nginx/sites-available/default文件
将其中的
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.html;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}
改成
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
# try_files $uri $uri/ /index.html;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
if (!-e $request_filename) {
rewrite ^/(.*) /index.php last;
}
}