nginx簡(jiǎn)單的反向代理一般是
server{ listen 80; server_name localhost; index index.html ; location / { proxy_pass https://192.168.1.x/; } }
這是最簡(jiǎn)單的nginx反向代理,用前輩的話(huà)來(lái)說(shuō)最low的方式。我就用這種方式代理,頁(yè)面服務(wù)不正常出現(xiàn)很多404,
其實(shí)很簡(jiǎn)單,修改如下:
location / { proxy_pass https://192.168.1.x/ proxy_set_header Host $host:${server_port}; }