IncludeOptional sites-enabled/*.conf Enable Apache Directoriesģ. On nf file add the following directive line at the bottom of the file, which will make Apache read and parse all files located on /etc/httpd/sites-enabled/ ended in. # nano conf/nf Create Apache Vhost DirectoriesĢ. To begin, start by entering on /etc/httpd/ path, create sites-available and sites-enabled directories and edit Apache nf file to apply the new enabled websites location. LAMP Basic Installation on RHEL/CentOS 7.0Ĭreate and Manage Apache Virtual Hosts in RHEL/CentOS 7ġ.Apache Virtual Hosting with Enable/Disable Options Requirements This approach has some advantages because you done have to mess with httpd configuration file and every virtual host has its own configuration file that can be found on a single location – enabled hosts are just symlinks – which make the process of enabling, disabling, creating or deleting them very manageable. This guide will use a Debian like approach on enabling and managing Virtual Hosts on Red Hat Enterprise Linux/CentOS 7.0 by creating two directories on /etc/httpd/ path, which will keep all enabled and disabled website file configurations – sites-available and sites-enabled, and two types of scripts to act as commands, one that enables and other that disables specified virtual hosts – a2ensite and a2dissite. Virtual Hosting allows Apache Weberver to serve different content based on IP Address, hostname or used port number.
0 Comments
Leave a Reply. |