HTTP 错误码
条评论403 Forbidden
The HTTP 403 Forbidden
response status code indicates that the server understands the request but refuses to authorize it.
This status is similar to 401
, but for the 403 Forbidden
status code reauthenticating makes no difference. The access is permanently forbidden and tied to the application logic, such as insufficient rights to a resource.
Examples
因为用户权限问题导致的403状态码
通过user属性设定,Nginx是为哪个用户启动的
如果设定启动的用户对Nginx服务对应的页面文件夹没有访问权限就会出现403的拒绝服务。
比如为Nginx服务新建www账户,但是user设定为foo则会出现上面这种错误
- 应该将启动用户改成www,或者让foo具有www用户文件夹的访问权限,或者
- 将用户改成root,那么对任何文件夹都有读取权限。但是这种操作不便于专门维护www服务的人员管理。
- 本文链接:https://blog.charjin.top/2022/07/22/linux/http-errors/
- 版权声明:本博客所有文章除特别声明外,均采用 CC BY-NC-SA 3.0 CN 许可协议。转载请注明出处!
分享