一、nginx代理https的关键配置
server {listen 80;server_name localhost;
location /**/ {proxy_pass https://192.168.1.11:8787/; proxy_set_header Host 192.168.1.11:8787;# ...其他 proxy_set_header}}
二、nginx代理域名和http是的配置
1、首先需要确定是否能在服务器上ping通域名,若无法ping通(未禁ping的情况下),配置/etc/hosts文件(修改即生效)。
#在末尾增加一行 ip地址 域名,如下 192.168.1.11 yuming.ga
2、nginx.conf关键配置
server {listen 80;server_name localhost;location /**/ {proxy_pass https://yuming.ga:8787/; proxy_set_header Host yuming.ga:8787;# ...其他 proxy_set_header}}
