首页 > 解决方案 > Nginx 403 禁止

问题描述

当我尝试从http://server/icon.jpeg之类的文件夹中获取图片时,它会给出错误 403 禁止。如果文件夹有用户访问 www-data 有什么问题?这是我的代码:

  server {
       location /{
         proxy_pass http://localhost:5000/;
       }
       location ~ \.(gif|jpeg|png)$ {
          root /root/ShopsAggregator/usersicons;
           autoindex on;
            autoindex_exact_size off;
       }
  }

标签: nginx

解决方案


推荐阅读