VPS侦探论坛

 找回密码
 注册
查看: 11185|回复: 1

为什么老是提示我有冲突,军歌帮忙看看

[复制链接]
发表于 2010-6-28 22:16:29 | 显示全部楼层 |阅读模式

此次 /root/lnmp reload 都会提示冲突,军歌帮看看修改哪里?

Reload LNMP...
Reload Nginx configure...
[warn]: conflicting server name "www.baowang.com" on 0.0.0.0:80, ignored
[warn]: conflicting server name "baowang.com" on 0.0.0.0:80, ignored
the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
configuration file /usr/local/nginx/conf/nginx.conf test is successful



  1. server
  2. {listen 80;
  3. server_name _; #default
  4. return 444; }


  5. server
  6. {listen 80;
  7. server_name www.baowang.com baowang.com;
  8. if ($host != 'www.baowang.com' ) {
  9. rewrite ^/(.*)$ http://www.baowang.com/$1 permanent;}
  10. root /home/wwwroot/www.baowang.com;
  11. index index.html index.htm index.php;



  12. #以下为图片防盗链规则
  13. location ~* \.(gif|jpg|png|swf|flv)$ {
  14. valid_referers none blocked www.baowang.com baowang.com localhost;
  15. if ($invalid_referer) {
  16. rewrite ^/ http://127.0.0.1/;
  17. #return 404;
  18. }
  19. }
  20. #以上为图片防盗链规则



  21. #以下这段是为了防止Nginx漏洞
  22. location ~ .*\.(php|php5)?$
  23. {if ($request_filename ~* (.*)\.php)
  24. { set $php_url $1; }
  25. if (!-e $php_url.php)
  26. {return 403;}
  27. #以上这段是为了防止Nginx漏洞
复制代码
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2010-6-29 09:09:04 | 显示全部楼层


可能是绑定的域名有冲突
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-8 07:19 , Processed in 0.031797 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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