2024/07/22 15:40:09 [error] 68243#68243: *7557 "/home/*****/data/blog-data/index.html" is forbidden (13: Permission denied), client: ***.***.**.**, server: blog.com, request: "GET / HTTP/1.1", host: "blog.com"
我尝试根据 GPT4o 给的解决方案,将改目录用户组改为了 www-root 但是依旧 403 错误。
也尝试过以下操作,也依旧 403 。
# 设置目录权限为 755
find /home/*****/data/blog-data -type d -exec chmod 755 {} \;
# 设置文件权限为 644
find /home/*****/data/blog-data -type f -exec chmod 644 {} \;
nginx 配置文件如下:
server {
listen 443 ssl;
server_name 1900.live;
include snippets/ssl-params.conf;
location / {
root /home/****/data/blog-data;
index index.html;
}
location ~ /.well-known {
allow all;
}
client_max_body_size 50m;
}