nginx根据URL分配请求给不同的服务

xiaoxiao2021-02-28  22

在nginx的nginx.conf配置文件中追加下面代码,nginx.conf一般在/usr/local/nginx/conf下面

   server {

listen 80; server_name 202.103.95.166; location /web {                 proxy_pass  http://192.168.23.32:8899/web;    } location /mobile {                 proxy_pass  http://192.168.23.32:8899/mobile; } location /api {                 proxy_pass  http://192.168.23.32:10009/api; }     }
转载请注明原文地址: https://www.6miu.com/read-2596099.html

最新回复(0)