配置nginx,如下所示
location ~ "^/[A-Z0-9]{32}" {
alias /opt/eds/web/html;
index index.html index.htm;
}nginx异常日志
`2019/12/17 23:22:56 [error] 28874#28874: *4 directory index of "/opt/eds/web/html" is forbidden`修改nginx配置,如下所示
location /25DE5ADF310211E9BDB874D435BEC0BA {
alias /opt/eds/web/html;
index index.html index.htm;
}访问没有问题
发布于 2019-12-18 04:35:07
当alias与正则表达式location一起使用时,您需要捕获URI的其余部分并将其附加到alias值上。
例如:
location ~ "^/[A-Z0-9]{32}(/.*)?$" {
alias /opt/eds/web/html$1;
index index.html index.htm;
}详情请参见this document。
https://stackoverflow.com/questions/59377382
复制相似问题