diff --git a/docker/nginx/sites-enabled/app.conf b/docker/nginx/sites-enabled/app.conf index c7b433b2f..552557af2 100644 --- a/docker/nginx/sites-enabled/app.conf +++ b/docker/nginx/sites-enabled/app.conf @@ -37,8 +37,19 @@ } # --- REWRITE-END --- + # --- 子目录 hwapp 及 hwappx 的配置,请勿删除,支持子目录网站,刷新,重定位 --- + location ~ ^/hwapp/(.*)$ { + try_files $uri $uri/ /hwapp/index.html; + } + + location ~ ^/hwappx/([^/]+)/(.*)$ { + try_files $uri $uri/ /hwappx/$1/index.html; + } + # --- 子目录 hwapp 及 hwappx 配置结束 --- + + #禁止访问的文件或目录 - location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md) + location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)$ { return 404; }