Apache2 has growing demand among Linux Hosting consumers. For installing Apache2 you need to enter the following command at a terminal prompt.
sudo apt-get install apache2
Further more you need to place directives in plain text configuration files, these directives are separated between the following shown files and directories
- apache2.conf: This is the main Apache2 configuration file. Contains settings that are global to Apache2.
- conf.d: This contains configuration files which are applicable globally to Apache2 and some other packages which can be used by Apache2 for addition or symlinking files to this directory.
- envvars: Apache2 environment variable are set in this file.
- httpd.conf: Named after the httpd daemon, this was the Apache2 configuration file, it can be used for particular configuration option which globally affects Apache2.
- mods-available: Not only for loading modules but also for their configuration, this file can be utilized. (Only few specific and not all of the modules are included it this file)
- mods-enabled: This file has the ability to hold symlinks of files situated at /etc/apache2/mods-available, and this makes it possible to enable the symlinked file enabled at the next time Apache2 is restarted.
- ports.conf: Herea are the directives which analyze, which TCP ports Apache2 is listening currently.
- sites-available: Configuration files for Apache2 Virtual Hosts can be found in this directory. These virtual hosts permit Apache2 to get configured for more than one website which have their own separate configuration settings.
- Sites-enabled: similar to ‘mods-enabled’ here one can find symlinks at /etc/apache2/sites-available directory, also when a particular configuration file in ‘sites-enabled is found symlinked, the website configured by it can be kept active when the Apache2 is restarted.