centos – linux命令行可以连接但是webserver(或php)无法连接
作者:互联网
我们可以使用linux(centos 6)命令行(curl,wget,…)连接到特定的URL
但我们无法通过webserver(apache)或php连接到它.
我做了setenforce 0命令,之后webserver和php可以连接.
哪个selinux规则导致此问题以及如何在启用selinux时通过webserver(或php)进行连接?
解决方法:
您可以使用setsebool httpd_can_network_connect = 1
标签:selinux,php,centos,apache-httpd 来源: https://codeday.me/bug/20190813/1645463.html