Using and Abusing Services
123
Starting with Apache
If you have Kali running on your system, Apache is already installed. Many
other Linux distros have it installed by default as well. If you don’t have
Apache installed, you can download and install it from the repositories by
entering the following:
kali >
apt-get install apache2
The Apache Web Server is often associated
with the MySQL database
(which we will look at in the next section) and these two services are very
often paired with a scripting language such as Python or PHP to develop
web applications. This combination of Linux, Apache, MySQL,
and PHP
or Python forms a powerful and robust platform for the development and
deployment of web-based applications, known collectively as
LAMP. These
are the most widely used tools for developing websites in the Linux world—
and they’re very popular
in the Microsoft world too, where they’re generally
referred to as
WAMP, with the
W standing for Windows.
From the command line enter the following:
kali >
service apache2 start
Now that Apache is running in the background, it should be able to
serve up its default web page. Enter
http://localhost/ in
your favorite web
browser to bring up the web page, which should look something like
Figure 12-1.
Figure 12-1: The Apache2 Web Server default page
As you can see, Apache displays “It works” as its default web page. Now
that you know your
Apache Web Server is working, let’s customize it!