1.下载Nginx的headers-more-nginx-module
2.编译Nginx
3.安装Nginx
[root@localhost ~]# make install
4.修改nginx配置
location / {
more_set_headers "Server: Nginx Web Server";
more_set_headers "Content-Security-Policy: upgrade-insecure-requests";
proxy_pass http://tale;
include /zxk175/nginx/nginx/conf/conf/proxy.conf;
root /zxk175/tale/resources;
index index.jsp index.htm index.html;
}
5.测试Nginx配置和启动
[root@localhost sbin]# ./nginx -t
[root@localhost sbin]# ./nginx