OnWorks Linux and Windows Online WorkStations

Logo

Free Hosting Online for WorkStations

< Previous | Contents | Next >

5.3.4. Configuring Apache‌


A typical Kali Linux installation includes the Apache web server, provided by the apache2 package. Being a network service, it is disabled by default. You can manually start it with systemctl start apache2.

With more and more applications being distributed as web applications, it is important to have some knowledge of Apache in order to host those applications, whether for local usage or for making them available over the network.

Apache is a modular server and many features are implemented by external modules that the main program loads during its initialization. The default configuration only enables the most common modules, but enabling new modules is easily done by running a2enmod module. Use a2dismod module to disable a module. These programs actually only create (or delete) symbolic links in /etc/apache2/mods-enabled/, pointing at the actual files (stored in /etc/apache2/ mods-available/).

There are many modules available, but two are worth initial consideration: PHP and SSL. Web ap- plications written with PHP are executed by the Apache web server with the help of the dedicated

module provided by the libapache-mod-php package, and its installation automatically enables the module.

Apache 2.4 includes the SSL module required for secure HTTP (HTTPS) out of the box. It first needs to be enabled with a2enmod ssl, then the required directives must be added to the configuration files. A configuration example is provided in /etc/apache2/sites-available/default-ssl. conf. See http://httpd.apache.org/docs/2.4/mod/mod_ssl.html for more information.

The full list of standard Apache modules can be found online at http://httpd.apache.org/docs/ 2.4/mod/index.html.

With its default configuration, the web server listens on port 80 (as configured in /etc/apache2/ ports.conf), and serves pages from the /var/www/html/ directory by default (as configured in

/etc/apache2/sites-enabled/000-default.conf).


 

Top OS Cloud Computing at OnWorks: