VPS侦探论坛

 找回密码
 注册
查看: 5766|回复: 5

设置404页面出问题

[复制链接]
发表于 2014-10-5 20:38:01 | 显示全部楼层 |阅读模式

按照军哥设置404页面的教程去做
在测试的时候,出错
[root@VPS-XXXX ~]# /usr/local/nginx/sbin/nginx -t
nginx: [emerg] 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
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 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不存在
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2014-10-5 22:01:04 | 显示全部楼层

n.conf不存在?
什么意思,要怎么处理?
是不是因为上传了之前的域名.conf?
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 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;?这个删掉?
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2014-10-5 22:04:14 | 显示全部楼层

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

军哥运维代购:http://shop63846532.taobao.com/

 楼主| 发表于 2014-10-5 22:15:09 | 显示全部楼层

已经弄好,谢谢军哥回答
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-5-18 23:49 , Processed in 0.026864 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表