VPS侦探论坛

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

nginx二级域名设置不成功请教

[复制链接]
发表于 2016-5-26 12:22:36 | 显示全部楼层 |阅读模式

配置文件,域名管理哪里A记录 *。xxx。com泛域名设置好了。服务器系统centos6.5迷你板,lnmp1.2安装nginxserver
    {
        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 dscNginx.conf;
        #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 ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
            expires      30d;
        }

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

        access_log off;
    }
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2016-5-26 14:12:43 | 显示全部楼层


不清楚你所说的设置不成功的意思,是无法访问还是怎样?
看配置文件配置文件没错误
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2016-5-26 19:24:20 | 显示全部楼层

设置二级域名后都一直指向首页。。没有指向相关页面,二级域名是商户自己设置
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2016-5-26 21:06:54 | 显示全部楼层



添加的域名指向默认页面可能是配置文件未生效或有错误或nginx上有其他问题
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-4-27 01:24 , Processed in 0.026425 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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