linux commandline can connect but webserver (or php) can't connect
7,054
You can use setsebool httpd_can_network_connect=1
Related videos on Youtube
Comments
-
Metalik over 1 year
We can connect to a specific url with linux (centos 6) commandline (
curl
,wget
,...)But we can't connect to it by webserver (apache) or php.
I did
setenforce 0
command, after that webserver and php can connect.Which selinux rule cause this problem and how can connect by webserver(or php) when selinux is enabled ?
-
Admin about 9 yearssolved by: setsebool httpd_can_network_connect=1
-
Admin about 9 yearsPlease post that as an answer and accept it. Ideally, clearly explain what file you had to add that line to.That way, the question can be marked as solved.
-