學習筆記(55):高併發下的Nginx性能優化實戰-高併發下Nginx安全配置

立即學習:https://edu.csdn.net/course/play/27216/358414?utm_source=blogtoedu

安全配置:

1.版本安全:ngix.conf中的http模塊中增加

server_tokens off;

2.IP安全:在location進行白名單和黑名單設置。

白名單: allow

黑名單:deny

3.文件安全:展示某目錄下的信息。

a.設置對應的目錄,增加:

autoindex on;

root /xxx/xxx;

b.設置匹配文件的正則表達式,用於設置展示的內容,增加:

add_header Content-Type text/plain;

root /xxx/xxx;

4.連接安全:https開啓

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章