In the article, I am going to cover how to configure apache server in Kali Linux, webserver apache in Kali Linux. Apache web server is similar methods are used in other Linux distribution. Simple commands can make an expert in using the webserver.
The Apache web server checks first if the user name provided may access this directory; If the name matches, the web server check if the password provided by the user matches the password in the htpasswd file; If the authentication was fine, the user can access the files provided in the directory. The Apache HTTP Server is configured via simple text files. These files may be located any of a variety of places, depending on how exactly you installed the server. Common locations for these files may be found in the httpd wiki. If you installed httpd from source, the default location of the configuration files is /usr/local/apache2/conf. The Apache HTTP Server, an open-source web server developed by the Apache Software Foundation. The Apache server is used to host web content. It responds to requests for content from web browsers, such as Internet Explorer and Firefox. The following example is a simple.
In this video you will find the basic Apache web server configuration in Hindi.Find some more videos on Linux:IPA Server: https://www.youtube.com/watch?v=H8Q. Apache HTTP Server. Apache HTTP Server, colloquially known as Apache or httpd.
Originally this post is written on Jun 11, 2014, and last updated in April 2021. This article is not related to the cheap web server, web hosting, business web hosting, cloud hosting or any type of dedicated hosting service. This article defines only local webserver on Kali Linux for local Penetration testing.
A web server is a type of server, that delivers web pages to the clients as per their request. Every Web server has an IP Address and domain name for identification. Server Administrator can make local webserver setup.
You can make a simple computer to work as a web server, It may be Windows, Linux or mac. You can install any web server software on your basic system. For example Xamp, Wamp etc.
Both of these software has apache web server.
I dont want to go in depth related this topic. So come back on the topic Web server in Kali Linux.
This is time to say thanks to Kali Linux developers, who have installed already Apache webserver in Kali Linux. But by default, apache service is not running.
I will explain in this article about configuration of apache server.
How do you know you web server is running or not? what happened if server is running.
When your server is ready to deliver web pages then you can access through web browser.
Clients access the web pages through a Web browser like Google Chrome, Firefox, Safari, etc.
You need to enter URL or IP address into the address bar of the web browser and the page will be delivered by Web server scripting.
If you enter https://www.cyberpratibha.com/blog in the Address bar it will be served by Web Server.
In Kali Linux, you don’t need to set up a web server because Kali Linux has a pre-installed apache server. Hacker uses this webserver to deliver a web page containing malicious code to the victim by the help of a local webserver or by doingport forwarding.
We can trap them by using social engineering method for example Phishing. There are others who use the HTTP service in penetration testing.
it manages dedicated web server capacity to deliver pages and have web server load balancing.
Use GUIs to Start Restart Apache2 web Server in Linux
It is the easiest way to start, stop and restart the Apache2 service in GUI mode. Select Applications from the top bar of the Kali screen, next sub-menu bar will be displayed, Select Kali Linux menu, another fly-out display bar will appear, then go on the services menu, again next fly-out menu bar will display, In this bar web service can be start, stop and restart.
Once a selection happened, a command shell will open and the status of service will be displayed. When the Apache server has been started, the default page will be display by typing Attacker’s ip address in the web browser. IceWeasle is default web browser in Kali Linux distribution.
Note: GUI to start, stop, restart apache2 is not support in Kali Linux 2016.2 version.
Check the status of Apache server
Your first step to check the apache server is installed on your machine or not. Use the following command to check installed package apache2
apt list –installed apache2
In the above result, you can see apache2 installed.
Next check the status of apache web server in Kali Linux. Use the following command to do that:
Simple Apache Web Server Tutorial
Press the “q” to exit command.
You can see in the result apache service status is inactive. If the service is inactive then you can access its web pages.
Apache Web Server Versions
For example:
Open a web browser and type localhost/127.0.0.1 then hit enter.
You will get an error “Unable to connect”.
It means the webserver is not running on your Kali Linux machine. Now your next step to start the apache server.
Start, Stop and Restart the Apache webserver in Kali Linux
It is easy to start, stop and restart Web Server using the simple command in the terminal /etc/init.d/apache2 followed by requested action (stop, start or restart). Following commands are used
#/etc/init.d/apache2 start
#/etc/init.d/apache2 start
#/etc/init.d/apache2 stop
#/etc/init.d/apache2 restart
Another way to start, stop of restart Apache2 service by following commands
#service apache2 start
#service apache2 stop
#service apache2 restart
The Default Web Page
Once the Apache service is up and running the default (It works!) page may need to be changed, to do this make the web content that ought to be shown on the page and spare it as index.html in the /var/www/ index. Then again, the current index.html document in this area could be modified what’s more new pages might be included.
MODULE 3:- Basics of Kali Linux
If Appreciate My Work, You should consider:
- Join Group for Discussion Facebook Group
- Get your own self-hosted blog with a Free Domain at ($2.96/month)
- Buy a Coffee to Us! Make Small Contribution by Paypal
- Support us by taking our :Online Courses
- Contact me :[email protected]
Sometimes you are required to deliver data to your customers. What if you do not possess a beautiful CMS system such as WordPress? Of course, you could just set up a FTP server and provide your customers with login credentials. These who are technical aware will use a proper program to access the data (and thus won’t care for beauty), but those who do not know how to use such a tool will be prompted with something like that:
A real beauty, isn’t she? We can do much better than that. This time the idea is to create a download server for many customers – where each customer would need to receive individual files (imagine you providing 50 customers with 50 different PDF files). The restrictions? No FTP and – more important – no database. And no programming involved. Sounds impossible? Well no, thanks to the directory listing and the fancyindexing feature of the Apache web server you can create a quite beautiful download site for each individual customer. Results first:
The results can be quite stunning when you know your way around with HTML and CSS, but the more important fact is: we did use the Apache webserver for the result only. No database, no(t too much) coding, no FTP server involved. I promise.
The diagram above pretty much explains all the magic involved (simplified, of course).
- A user tries to access a folder on your site, for example: www.loremipsula.com/14522
- The Apache web server checks first if the user name provided may access this directory
- If the name matches, the web server check if the password provided by the user matches the password in the htpasswd file
- If the authentication was fine, the user can access the files provided in the directory.
The only thing that is VITAL is that the htpasswd file is not accessible to the general public (usually it is not).
How To Setup A Simple Apache Web Server In A Docker Container
The next step is to tell the Apache web server that Indexing should be allowed for a certain directory. This setting usually resides in the httpd.conf file of the web server (note: on OS X systems there is a separate file called {username}.conf in the directory /private/etc/apache2/users which overrules the settings from the httpd.conf!).
Let’s say I want to enable indexes, my directory tag could look like this – AllowOverride is set to All:
Note that there is a separate switch Indexes only. You may find more detailled information here. Now a separate .htaccess file will be accepted by the web server in my directories!
Let’s say I’ve got five different users: each user is assigned a unique number. Each user is assigned a password. For testing purposes, you can use this tool to generate several passwords for your users. If you have to create more users, you should either use the command line tool or use a script.
Finally, my htpasswd file looks as follows:
For testing purposes, the password for each user is ‘test’.
Now let’s create one folder per user. Within each folder, we need to place a file called .htaccess with the following content (you need to change the location of the htpasswd file):
Although most of it should be clear, here’s a more detailled explanation:
Simple Apache Web Servers
The last step is about the design. As you may have seen, the purple section contains a lot of design-related settings:
As you can see, I currently:
- Use my own header and footer files for a custom logo and custom text and
- Use my own icons for different files that reside in the directory
Apache Web Server History
All available options are explained in detail here. That’s almost it – now I just need to adjust the user in each and every .htaccess file and put it to the respective directory.
Simple Apache Web Server Login
Please note that we are just using http basic authentication here which can be rather insecure if someone can access the traffic – the (hashed) passwords are transmitted base64 encoded only. If you plan to use this in combination with sensitive data, you should apply http digest authentication with apache.
If you need the sample project to give you a better start, feel free to download it here: project.