server{
listen 5002 ssl; #nginx服务端口
server_name localhost; #域名
root "D:/phpstudy_pro/WWW";
index index.html index.htm;
ssl_certificate "D:/zhengshu/5155147_xueli.plus.pem";#证书路径
ssl_certificate_key "D:/zhengshu/5155147_xueli.plus.key";#证书路径
gzip on;
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
gzip_types *;
gzip_vary on;
# 反向代理
location / {
try_files $uri /index.html;
proxy_pass http://bm.scs.gov.cn/pp/gkweb/core/web/ui/business/auth/login.html/;
proxy_set_header Host $proxy_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Via "nginx";
}
}
nginx https代理http ,以及代理外网
最新推荐文章于 2024-08-14 15:52:18 发布