Enable Apache UserDir In CentOS 7 / RHEL 7 with SELinux

Lets show you how to install userdir for Centos 7 with Selinux Enabled. In this method all users should have their own public_html directory.

1. Go to root user

2. Create /etc/httpd/conf.d/userdir.conf file

Install apache: 

Enable Apache Userdirs


Restart apache

Then create user’s public_html and assign permissions.

Then here’s the other new things, especially you are using SELinux

Lets make a test 


Change ownership 

Run the test by navigating to the following URL from your browser.

Leave a Reply

Your email address will not be published. Required fields are marked *

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