自己設置的ipblock.conf文件,deny了自己的手機ip然后includeipblock.conf;到服務器的nginx.conf的http{}下面效果:網站1是https協議,ip屏蔽成功網站2是http協議,ip屏蔽無效然后將在http網站的conf文件里面添加了includeipblock.conf;依然無效然后將denyip;直接寫到http協議網站的conf文件里面,還是無法屏蔽請教各位上仙,這個怎么解決相關配置:文件夾/conf/下面文件:ipblock.confdenyip;…………文件:nginx.confhttp{includemime.types;default_typeapplication/octet-stream;includeipblock.conf;…………文件夾/conf/vhost下面網站1(https協議).confserver{listen80;#listen[::]:80;server_namewww.name1.comname1.com*.name1.com;return301https://www.nam1e.com$request_uri;}server{listen443sslhttp2;#listen[::]:443sslhttp2;server_namewww.name1.comname1.com*.name1.com;indexindex.htmlindex.htmindex.phpdefault.htmldefault.htmdefault.php;root/home/wwwroot/www.name1.com;sslon;…………網站2(http協議).confserver{listen80;#listen[::]:80;server_namewww.name2.comname2.com;indexindex.htmlindex.htmindex.phpdefault.htmldefault.htmdefault.php;root/home/wwwroot/www.name2.com;//這兒添加的includeipblock.conf;//或者直接寫的denyip;
NGINX屏蔽ip,https(443端口)有效,而http(80端口)無效
江戶川亂折騰
2019-05-23 11:28:06