sites-available directory

The /etc/apache2/sites-available directory holds configuration files for Apache Virtual Hosts. Virtual Hosts allow Apache to be configured for multiple sites that have separate configurations.

Configuration files will contain the Directory directives specifying the location of the site and features you have set up for it. The 000-default.conf file contains configuration directives for the default Web server, such as the directory directives locating the default site at /var/www/html.

To make a site accessible, a link to its configuration file must be created in the /etc/apache2/sites-enabled directory. This is done using the a2ensite command. To disable a web site, the a2dissite command is used.

Here is the configuration of the default virtual host (from the 000-default.conf file):

000-default_file

Geek University 2022