Creating an HTTP Web Server with the Apache Web Server




Download 7,3 Mb.
Pdf ko'rish
bet114/115
Sana27.11.2023
Hajmi7,3 Mb.
#106243
1   ...   107   108   109   110   111   112   113   114   115
Bog'liq
linuxbasicsforhackers
mashinali o\'qitishga kirish, 1698393090
Creating an HTTP Web Server with the Apache Web Server
The Apache Web Server is probably the most commonly used service on 
Linux systems. Apache is found on over 55 percent of the world’s web serv-
ers, so any self-respecting Linux admin should be familiar with it. As a 
hacker aspiring to hack websites, it’s critical to understand the inner work-
ings of Apache, websites, and the backend databases of these sites. You can 
also use Apache to set up your own web server, from which you could serve 
up malware via cross-site scripting (XSS) to anyone who visits your site, or 
you could clone a website and redirect traffic to your site via abuse of the 
Domain Name System (DNS). In either of these cases, a basic knowledge of 
Apache is required.


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!



Download 7,3 Mb.
1   ...   107   108   109   110   111   112   113   114   115




Download 7,3 Mb.
Pdf ko'rish

Bosh sahifa
Aloqalar

    Bosh sahifa



Creating an HTTP Web Server with the Apache Web Server

Download 7,3 Mb.
Pdf ko'rish