Nginx serve static file and got 403 forbidden

后端 未结 8 949
长情又很酷
长情又很酷 2020-12-04 08:36

Just want to help somebody out. yes ,you just want to serve static file using nginx, and you got everything right in nginx.conf:

location /s         


        
8条回答
  •  攒了一身酷
    2020-12-04 08:38

    For me is was SElinux, I had to run the following: (RHEL/Centos on AWS)

    sudo setsebool -P httpd_can_network_connect on 
    chcon -Rt httpd_sys_content_t /var/www/
    

提交回复
热议问题