VPS侦探论坛

 找回密码
 注册
查看: 5114|回复: 3

添加二级域名的时候一直指向default文件夹

[复制链接]
发表于 2016-4-27 16:49:39 | 显示全部楼层 |阅读模式

vhost 的设置文件如下
server
    {
        listen 80;
        #listen [::]:80;
        server_name xxx.xxx.com;
        index index.html index.htm index.php default.html default.htm default.php;
        root  /home/wwwroot/xxx.xxx.com;

        include wordpress.conf;
        #error_page   404   /404.html;
        include enable-php.conf;

        location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$
        {
            expires      30d;
        }

        location ~ .*.(js|css)?$
        {
            expires      12h;
        }

        location ~ /.
        {
            deny all;
        }

        access_log  /home/wwwlogs/xxx.xxx.com.log;
    }

nginx -t 也没有错误提示。
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
请问一下是哪一步出错了?-- NORMAL --

[ 本帖最后由 lexluthor 于 2016-4-27 16:56 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2016-4-27 20:52:38 | 显示全部楼层


只看这个配置文件没错误

这个网站根目录下是否有index文件
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2016-4-28 14:39:36 | 显示全部楼层

回复 2# 的帖子


index文件是存在的,是不是我godaddy的设置不对?
我在godaddy里直接把二级域名的forwarding to设置为IP地址了
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2016-4-28 15:18:14 | 显示全部楼层

回复 2# 的帖子




删除了一次再添加之后成功了。。。会不会是bug?
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-29 05:31 , Processed in 0.025726 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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