server{ listen 80; server_name localhost; index index.html ; location / { proxy_pass https://192.168.1.x/; } }
这是最大略的nginx反向代理,用前辈的话来说最low的办法。我就用这种办法代理,页面做事不正常涌现很多404,
实在很大略,修正如下:
location / { proxy_pass https://192.168.1.x/ proxy_set_header Host $host:${server_port}; }