域名:www.aaa.com
论坛:bbs.aaa.com
正常应该是输入aaa.com就直接打开www.aaa.com,但现在是输入aaa.com打开的却是bbs.aaa.com,何故?是解析的问题还是nginx配置文件的问题?nginx配置文件如下:
server_name www.aaa.com www.bbb.com;
if ($host = "47.94.xx.xx") { rewrite ^(.*)/$ https://www.aaa.com/$1 permanent; }
access_log /data/wwwlogs/www.aaa.com_nginx.log combined;
index index.html index.htm index.php;
root /data/wwwroot/www.aaa.com/public;
if ($ssl_protocol = "") { return 301 https://$host$request_uri; }
include /usr/local/nginx/conf/rewrite/laravel.conf;
#error_page 404 /404.html;
#error_page 502 /502.html;server_name bbs.aaa.com bbs.bbb.com;
if ($host = "47.94.xx.xx") { rewrite ^(.*)/$ https://www.aaa.com/$1 permanent; }
access_log /data/wwwlogs/bbs.aaa.com_nginx.log combined;
index index.html index.htm index.php;
root /data/wwwroot/bbs.aaa.com;
if ($ssl_protocol = "") { return 301 https://$host$request_uri; }
include /usr/local/nginx/conf/rewrite/discuz.conf;
#error_page 404 /404.html;
#error_page 502 /502.html;
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。