proxy_pass isn't working when SELinux is enabled, why?

前端 未结 4 525
醉话见心
醉话见心 2021-02-04 04:03

I\'m having an application listening on port 8081 and Nginx running on port 8080. The proxy pass statement looks like:

$ cat /var/etc/opt/lj/output/services/abc.         


        
4条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-04 04:48

    Always prefer changing types to creating custom policies. In this case, Nginx will serve files with the httpd_sys_content_t type. Assuming your files are located in /var/www:

    semanage fcontext -a -t httpd_sys_content_t /var/www/*
    restorecon -R -v /var/www
    

提交回复
热议问题