Nginx配置反向代理
listen 80;
server_name ieeon.com; #填写对应域名
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
#将请求转成https
rewrite ^(.*)$ https://$host$1 permanent;
# #反向代理的地址以及端口号
# proxy_pass http://localhost:1010;
# #设置主机头和客户端真实地址,以便服务器获取客户端真实IP
# proxy_set_header Host $host;
# proxy_set_header X-Forwarded-Proto $scheme;
# proxy_set_header X-Real-Ip $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
评论区