Apache is a very strong and secure webserver. I think its not needed to explain the advantages of apache server. This post is actually for beginners. Configuring apache2 is little different than previous apache versions. Apache2 becomes more strong with more dependency on modules. Apache2 also makes the configuration a lot distributed. It makes apache more versatile and managable with lots of domain and sites in served by one server.
As usual to install apache we just need to make command(we should install it as root user): sudo apt-get install apache2
After installation we can manage server with: $sudo /etc/init.d/apache2 start/stop/restart/reload
To configure apache our main concern is /etc/apache2 directory
In the directory we will find the files httpd.conf, ports.conf
httpd.conf: Generally the sites configuration and common apache configuration which will be shared within entire apache server is configured here.
Ports.conf: This file is used to configure Virtual hosts, domain and ports. This is also a common configuration file.
Installing and Uninstalling modules:
Apache has a big collection of modules. Available modules can be found inside mods-available directory
To enable a module we need to run the command: a2enmod module_name
To disable we need to run the command: a2dismod module_name
All installed module configuration can be found in /etc/apache2/mods-enabled directory