nginx 禁止通过IP,未绑定域名访问服务器
生活随笔
收集整理的這篇文章主要介紹了
nginx 禁止通过IP,未绑定域名访问服务器
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
http://game.mediabooknow.com/read-tid-3450152.html
此域名指到 bbs.xxx.com 非法指向服務器。
? server
? {
??? listen?????? 80;
??? server_name? bbs.xxx.com;
??? index index.html index.htm index.php index.shtml;
??? root? /home/bbs;
??? if ($host !~ ^bbs\.xxx\.com$){
??????? rewrite ^(.*)??http://bbs.xxx.com$1?permanent;
}
即可解決。還可以導入帶來流量。
本文轉自 liang3391 51CTO博客,原文鏈接:http://blog.51cto.com/liang3391/500713
總結
以上是生活随笔為你收集整理的nginx 禁止通过IP,未绑定域名访问服务器的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 浅谈HTTP响应拆分攻击(一)
- 下一篇: iptables之xtables_add