403 Forbidden

403 Forbidden - HTTP | MDN (mozilla.org)

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状态码

Nginx出现403 forbidden_枫小秋 的博客-CSDN博客_403 forbidden nginx

通过user属性设定,Nginx是为哪个用户启动的

如果设定启动的用户对Nginx服务对应的页面文件夹没有访问权限就会出现403的拒绝服务。

比如为Nginx服务新建www账户,但是user设定为foo则会出现上面这种错误

  1. 应该将启动用户改成www,或者让foo具有www用户文件夹的访问权限,或者
  2. 将用户改成root,那么对任何文件夹都有读取权限。但是这种操作不便于专门维护www服务的人员管理。