nginx - 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;
}
}
解决方案
推荐阅读
- rust - 如何在使用“cargo build”编译依赖包之前运行命令?
- c - 不打印最后一个字符:仅在下一次输入后打印
- php - Eloquent 中的 3 个(可选)关系级别
- reactjs - 用方法反应 Typescript 自定义类型
- windows - IIS - 本地主机工作但应用程序 url 不起作用
- reactjs - 如何停止重新渲染 redux 状态?
- ubuntu-18.04 - 带有 libffi.so.6 的 Ubuntu 20.04 上的 AVISPA 错误:没有这样的文件或目录
- java - 错误:java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException with Apple M1
- django - 如何在Django视图函数中获取表单中特定字段的值?
- php - 创建随机文件名,但检查它尚未使用