nginx 编译安装,问题

# 编译

./configure \ --prefix=/lvyou/app/nginx \ --sbin-path=/lvyou/app/nginx \ --conf-path=/lvyou/app/nginx/conf/nginx.conf \ --pid-path=/lvyou/app/nginx/pid/nginx.pid \ --with-http_ssl_module \ --with-http_stub_status_module \ --with-http_flv_module \ --with-http_gzip_static_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;
        }

猜你喜欢

转载自www.cnblogs.com/whm-blog/p/12016868.html
今日推荐