I got board the other day,  so whilst on my CentOS 7 test box I thought, I know what! let’s setup user directory based virtual hosting using Apache so that every user on the system can serve up web files from their public_html directory.

In this post this is what I am going to discuss and share with you all.

1. First you will need to install Apache unless you have already.

2.  Create the below file

3. Within that file add the following

4. We then need to Restart Apache

5. Then Create the users public_html directory and then assign permissions

6. Configure SELinux to allow access to this new directory

7. Create a test html file within the public_html directy and change permissions

8. then test the url








Leave a Reply

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