改为路径匹配
http {
include mime.types;
default_type application/octet-stream;
#access_log logs/access.log main;
sendfile on;
keepalive_timeout 65;
server {
listen 9001;
server_name localhost;
location ~ /admin/hosp {
proxy_pass http://localhost:8201;
}
location ~ /admin/user {
proxy_pass http://localhost:8201;
}
location ~ /admin/cmn {
proxy_pass http://localhost:8202;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}



