|
|
bet | 18/18 | Sana | 22.08.2022 | Hajmi | 1,43 Mb. | | #847523 |
| Bog'liq (2)Linux Basics For Aspiring Hackers 2018
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 Perl or
PHP to develop web applications. This combination of Linux, Apache, MySQL, and PHP or Perl 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.
The first step, of course, is to start our Apache daemon. In Kali, go to Applications ▸ Services ▸ HTTPD and click Apache start. You can accomplish the same from the command line by entering the following:
kali >services apache2 start
Now that Apache is running, 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!
Editing the index.html File
Apache’s default web page is at /var/www/html/index.html. You can edit the index.html file to serve up whatever information you want, so let’s create our own. For this, you can use any text editor you please; I’ll be using Leafpad. Open up /var/www/html/index.html and you should see something like Listing 12-1.
"http://www.w3.org/TR/xhtm11/DTD/xhtm11-transiti
➊ Apache2 Debian Default Page: It works
|
|