使用nginx的rewrite实现代理指定目录
笔记
server { listen 80; server_name a.com; #charset koi8-r; #access_log logs/host.access.log main; location / { #root html; #index index.html index.htm; rewrite ^/.(.*)$ /sos/$1 last; } location ~* ^/sos/.*$ { proxy_pass http://127.0.0.1:8080; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; }
有时间在整理
时间: 2024-12-13 00:45:25