军哥,绑定新域名后总是指向默认的wwwroot/default目录
我检查了usr/local/nginx/conf/vhost下面对应的配置文件,发现并没有指向default目录,而是当初设置的目录域名 ss.hcmxl.com配置文件代码
server
{
listen 80;
#listen [::]:80;
server_name ss.hcmxl.com;
index index.html index.htm index.php default.html default.htm default.php;
root/home/wwwroot/ss;
if ($http_user_agent != "YSdfdDPOBI15104CTW205744fg1df78Z"){
return 444;
}
include wordpress.conf;
#error_page 404 /404.html;
location ~ [^/]\.php(/|$)
{
# comment try_files $uri =404; to enable pathinfo
try_files $uri =404;
fastcgi_passunix:/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/home/wwwlogs/ss.hcmxl.com.logaccess;
} 一般指向配置页面配置肯定有错误或没生效或该域名本来就帮到了默认虚拟主机上
/etc/init.d/nginx configtest 测试配置文件
回复 2# 的帖子
Test nginx configure files... nginx: "server" directive is not allowed here in /usr/local/nginx/conf/nginx.conf:103nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
这是未生效吗?
回复 3# 的帖子
都提示报错了肯定不会生效你肯定自己修改的配置文件,按提示找对应的错误
页:
[1]