Nginx 403 访问受限问题

2018-03-18  本文已影响245人  844b9a3a3a68

今天瞎搞,配置了一个文件虚拟目录,结果访问文件一直报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;
    }
上一篇下一篇

猜你喜欢

热点阅读