# 编译
./configure
--prefix=/usr/local/nginx
--with-http_ssl_module
--with-http_stub_status_module
--with-http_flv_module
--with-http_gzip_static_module
--with-http_dav_module
--with-http_stub_status_module
--with-http_addition_module
--with-http_sub_module
--with-http_mp4_module
##
make && make install
location ~ { #proxy_redirect off; proxy_redirect http:// https://; # 不写这个,tomcat的重定向 会给你重定向到 http!!切记 用这个,不用 off proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Ssl off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://127.0.0.1:8080; }