< 返回技术文档列表

Nginx 配置反向代理商 2022-11-15

发布时间:2022-11-17 22:59:32⊙投诉举报
server {    listen       8080;    server_name  www.ceshi.ii;        #反向代理商    location / {        proxy_pass http://127.0.0.1:5000;            # root   html;            # index  index.html index.htm;    }        #反向代理商    location / api / {        proxy_pass http://127.0.0.1:1234/;            proxy_redirect  off;            proxy_set_header  Host  $host;            proxy_set_header  X - Real - IP  $remote_addr;            proxy_set_header  X - Forwarded -For $proxy_add_x_forwarded_for;            # root   html;            # index  index.html index.htm;    }        #反向代理商    location / uploads / {        proxy_pass     http://127.0.0.1:5032/uploads/;        proxy_redirect  off;        proxy_set_header  Host  $host;        proxy_set_header  X - Real - IP  $remote_addr;        proxy_set_header  X - Forwarded -For $proxy_add_x_forwarded_for;        # root   html;        # index  index.html index.htm;    }}

/template/Home/Zkeys/PC/Static