今天瞎搞,配置了一个文件虚拟目录,结果访问文件一直报403错误,用了好多种方法,终于解决,做个笔记。
chmod 777 /home/image/
user root;
server
{
listen 443 ssl;
ssl_certificate /home/xxxx.crt;
ssl_certificate_key /home/xxxx.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
#listen [::]:80 default_server ipv6only=on;
server_name res.apiopen.top;
index index.html index.htm index.php;
root /home/image/;
#error_page 404 https://www.xxxxx.top/404;
include enable-php.conf;
location / {
index index.html index.htm index.php;
autoindex on;
}
access_log /www/wwwlogs/blogaccess.log;
}
网友评论