Apache/Nginx will not start: “Permission denied” error while opening configuration file

Table of Content


The Apache (httpd) service will not start/restart and produces the following error:

httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 5 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Syntax error on line 91 of /usr/local/psa/admin/conf/generated/13289086960.07411300_server.include: Syntax error on line 6 of /usr/local/psa/admin/conf/ip_vhosts_bootstrap.conf: Could not open configuration file /var/www/vhosts/islandsnow.ca/conf/13275227850.97707600_httpd_ip_default.include: Permission denied

The Nginx service is not starting. This error is displayed:

[root@server bin]# service nginx start
nginx: [emerg] open() "/var/run/nginx.pid" failed (13: Permission denied)


The status of SELinux should either be Disabled or Permissive:

[root@server bin]# getenforce

Switch SELinux to Permissive mode and check if the problem has gone:

[root@server bin]# setenforce 0
[root@server bin]# getenforce

To permanently disable SELinux on the server, follow the instructions provided in article #115626.

Залишити відповідь

Ваша e-mail адреса не оприлюднюватиметься. Обов’язкові поля позначені *