简体   繁体   中英

Your site is unable to reach WordPress.org at api.wordpress.org

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?

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

The problem was with SELinux. I turned it off and everything worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM