使用nginx的alias即可,例如下边的配置将子目录static_web代理到/www/wwwroot/bg.dr34m.cn路径,访问http://xxx.xx/static_web/index.html即可达/www/wwwroot/bg.dr34m.cn/index.html
static_web
/www/wwwroot/bg.dr34m.cn
http://xxx.xx/static_web/index.html
/www/wwwroot/bg.dr34m.cn/index.html
12345
location ^~ /static_web { alias /www/wwwroot/bg.dr34m.cn; index index.html; try_files $uri $uri/ /static_web/index.html;}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。