Search code examples
apacherhel7

How do I make the Apache Server point to the /var/www/html directory


In a new RHEL 7.5 server, I have created a var directory and within that the /www/html directory in which my website resides. When I try to access the website, I get the Apache Server Test page and mentions that the Apache server is running and I need to point to the /var/www/html directory.

How do I point the Apache Server to the /var/www/html directory?


Solution

  • You need to configure the available-sites and enabled-sites and remember to restart apache after changes in the config files.

    Have a look at this guide:

    https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts#step-four-%E2%80%94-create-new-virtual-host-files