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

前端 未结 4 524
醉话见心
醉话见心 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:28

    If you have another port or custom port allow it:

    Show allow port in http:

    semanage port -l | grep http
    

    This is output in my localhost:

    http_cache_port_t              tcp      8080, 8118, 8123, 10001-10010
    http_cache_port_t              udp      3130
    http_port_t                    tcp      80, 81, 443, 488, 8008, 8009, 8443, 9000
    pegasus_http_port_t            tcp      5988
    pegasus_https_port_t           tcp      5989
    

    And allow 8081:

    semanage port -a -t http_port_t -p tcp 8081
    

提交回复
热议问题