是不是把下面的内容全部替换成 你的文章https://bbs.vpser.net/viewthread.php?tid=1794&highlight=%E7%A6%81%E6%AD%A2IP里的代码server {
listen 80 default;
return 500;
}
下面是打开/usr/local/nginx/conf/nginx.conf 看到的代码
server
{
listen 80 default;
#listen [::]:80 default ipv6only=on;
server_name www.lnmp.org;
index index.html index.htm index.php;
root /home/wwwroot/default;
#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;
include fastcgi.conf;
#include pathinfo.conf;
}
location /nginx_status {
stub_status on;
access_log off;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log /home/wwwlogs/access.log access;
}
include vhost/*.conf; |