我正在尝试将 nginx 配置为从目录提供静态文件。并在尝试访问路径 /static/ 时获得 403 Forbidden
这是我的配置中的部分:
user root;
<...>
http {
<...>
server {
<...>
location /static/
{
alias /home/my_user/static/;
autoindex on;
}
<...>
}
}
我也有 777 递归权限/home/my_user/static/
,是的,我在目录中有 index.html。并且仍然收到错误。为什么?
操作系统:Centos 7