I installed Centos 7 nginx php 8.1 mariadb Wordpress.
There is no access to external connections in Wordpress. For example, I don't have access to the Wordpress plugin library
An error occurs: "Your site is unable to reach WordPress.org at api.wordpress.org, and returned the error: cURL error 6: Could not resolve host: api.wordpress.org; Unknown error"
But I checked Сurl in Сentos and it works. (like curl https://google.com)
[root@ ~]# curl https://www.google.com
<!doctype html><meta content="Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for." name="des..............
I also tried to change the "hosts" file and DNS settings in "resolve.conf". But it didn't help.
What could be the problem? As far as I understand, the problem is on the nginx side?
CodePudding user response:
Giving up on the security essential that makes Community Enterprise OS what it is, by disabling it, is never a solution.
The right way to allow web server processes to connect to external resources is an SELinux boolean switch:
sudo setsebool -P httpd_can_network_connect 1
CodePudding user response:
The problem was with SELinux. I turned it off and everything worked.