禁止訪問功能配置
nginx.conf中的http{}中的server{}的location ..{}中:
location / {
#拒絕訪問,192.168.16.0網段的同學都無法訪問 /24是子網掩碼的意思
deny 192.168.16.0/24;
root html;
index index.html index.htm;
}
404頁面
nginx.conf中的http{}中的server{}中:
#error_page 404 /404.html;
禁止訪問功能配置
nginx.conf中的http{}中的server{}的location ..{}中:
location / {
#拒絕訪問,192.168.16.0網段的同學都無法訪問 /24是子網掩碼的意思
deny 192.168.16.0/24;
root html;
index index.html index.htm;
}
404頁面
nginx.conf中的http{}中的server{}中:
#error_page 404 /404.html;
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。