我有以下工作指令:
location /en/tools {
alias /srv/nuxt/tools/dist/en/tools;
try_files $uri $uri/ @cache;
}
location /ar/tools {
alias /srv/nuxt/tools/dist/ar/tools;
try_files $uri $uri/ @cache;
}
location /he/tools {
alias /srv/nuxt/tools/dist/he/tools;
try_files $uri $uri/ @cache;
}
我试图将它们组合成一个基于正则表达式的指令,但服务器返回错误 403:
location ~* ^/(en|ar|he)/tools/(.*) {
alias /srv/nuxt/tools/dist;
try_files $uri $uri/ @cache;
}