VPS侦探论坛

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

军哥,绑定新域名后总是指向默认的wwwroot/default目录

[复制链接]
发表于 2016-7-15 23:17:29 | 显示全部楼层 |阅读模式

我检查了usr/local/nginx/conf/vhost下面对应的配置文件,发现并没有指向default目录,而是当初设置的目录域名 ss.hcmxl.com
配置文件代码
  1. server
  2.     {
  3.         listen 80;
  4.         #listen [::]:80;
  5.         server_name ss.hcmxl.com;
  6.         index index.html index.htm index.php default.html default.htm default.php;
  7.         root  /home/wwwroot/ss;
  8.                
  9.                 if ($http_user_agent != "YSdfdDPOBI15104CTW205744fg1df78Z"){
  10.            return 444;
  11.         }

  12.         include wordpress.conf;
  13.         #error_page   404   /404.html;
  14.         location ~ [^/]\.php(/|$)
  15.         {
  16.             # comment try_files $uri =404; to enable pathinfo
  17.             try_files $uri =404;
  18.             fastcgi_pass  unix:/tmp/php-cgi.sock;
  19.             fastcgi_index index.php;
  20.             include fastcgi.conf;
  21.             #include pathinfo.conf;
  22.         }

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

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

  31.         access_log  /home/wwwlogs/ss.hcmxl.com.log  access;
  32.     }
复制代码
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2016-7-16 07:43:24 | 显示全部楼层


一般指向配置页面配置肯定有错误或没生效或该域名本来就帮到了默认虚拟主机上

/etc/init.d/nginx configtest 测试配置文件
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2016-7-16 08:39:59 | 显示全部楼层

回复 2# 的帖子


Test nginx configure files... nginx: [emerg] "server" directive is not allowed here in /usr/local/nginx/conf/nginx.conf:103
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
这是未生效吗?
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2016-7-16 17:39:34 | 显示全部楼层

回复 3# 的帖子




都提示报错了肯定不会生效

你肯定自己修改的配置文件,按提示找对应的错误
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-29 07:15 , Processed in 0.026140 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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