By default, the SELinux boolean httpd_can_network_connect_db
is disabled.
If this setting is enabled, it should be disabled.
To disable the httpd_can_network_connect_db
SELinux boolean, run the following command:
$ sudo setsebool -P httpd_can_network_connect_db off