华为云nginx安全配置
1.减少点击劫持 修改nginx.conf,在http {}内添加:
1
2
3
4
5
http {
…
add_header X-frame-options SAMEORIGIN;
…
}
2.隐藏或伪装Nginx的版本及版本相关提示信息 修改nginx.conf,在http {}内添加:
1
2
3
4
5
http {
…
server_tokens off;
…
}
3.禁止开启Nginx的目录列表功能 修改nginx.conf,在http {}内添加:
1
2
3
4
5
http {
…
a