feinan 发表于 2014-10-5 20:38:01

设置404页面出问题

按照军哥设置404页面的教程去做
在测试的时候,出错
# /usr/local/nginx/sbin/nginx -t
nginx: open() "/usr/local/nginx/conf/n.conf" failed (2: No such file or directory) in /usr/local/nginx/conf/vhost/www.xxx.com.conf:9
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed


请问军哥这是哪里出问题了?

刚重装LNMP1.1,上传了以前的域名.conf到/usr/local/nginx/conf/vhost

licess 发表于 2014-10-5 21:30:08

open() "/usr/local/nginx/conf/n.conf" failed (2: No such file or directory) in /usr/local/nginx/conf/vhost/www.xxx.com.conf:9 已经提示你了n.conf不存在

feinan 发表于 2014-10-5 22:01:04

n.conf不存在?
什么意思,要怎么处理?
是不是因为上传了之前的域名.conf?

feinan 发表于 2014-10-5 22:03:21

server
        {
                listen 80;
                #listen [::]:80;
                server_name www.xxx.com;
                index index.html index.htm index.php default.html default.htm default.php;
                root/home/wwwroot/www.xxx.com;

                include n.conf;
                error_page 404 /404.html;

是不是include n.conf;?这个删掉?

feinan 发表于 2014-10-5 22:04:14

include n.conf;改为include none.conf;
是吗?
不知道为什么成了n.conf

feinan 发表于 2014-10-5 22:15:09

已经弄好,谢谢军哥回答
页: [1]
查看完整版本: 设置404页面出问题