Adding Virtual Hosts to Apache on CentOS

When adding a new *.conf file in /etc/httpd/conf.d/ folder and trying to restart the httpd service you may find that the service does not due to permission errors. Whatever you may try with file ownership, file permissions and different users starting Apache process nothing seems to work. This is due to a SELINUX security issue.

In order to instruct SELINUX to allow Apache use the .conf to give the following command:

 sudo chcon -t httpd_config_t [filename.conf]

 

 

 

Adding Virtual Hosts to Apache on CentOS

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.