nginx 同域名同端口多种不同路径的用法
server {listen 80;server_name xxxx;location ^~ /cdn/1/ {alias /opt/1/;}# 例:http://xx/cdn/1/index.html# 用alias: http://xx/opt/1/index.html# 用root: http://xx/opt/1/cdn/1/index.htmllocation ~* ^/1/(.*)$ {proxy_pass http://127.0.0.1:8080/$1?$args;}…
2026/8/8 17:28:30