The method described here will be an easy step by step installation and configuration of Apache web server, simply by copying and pasting the basic parameters so that we can have our entire site in the PC and access it the same way on the Internet. This method allows those who do not have the advanced knowledge, to have its own web server in your local computer.
What is a web server ?
A web server is software that is installed on the computer with all the necessary conditions to serve or give a web page requested by a browser, ensuring the look and represent all the elements needed for proper operation and visualization.
There are several types of web server, Apache is an open source software, free to use and fully configured, it is the most widely used in networking, Linux or Windows. When installed on the PC we will have a complete server with all the requirements to run locally.
How to install Apache ?
Installation is simple, go to Apache.org then download the latest version for Windows, or you can use the following link. Download Apache
Create two folders on drive C, name the first Apache and the second web_server.
Unzip the downloaded file and run it, follow the installation steps and data that ask you to choose the installation destination, which will be the folder you created in C: Apache, other data leave them default to configure later.
The program after installation creates an icon in the notification area that lets you: start, stop and restart Apache, you should keep in mind that any changes you make to the configuration file will not take effect until you restart the server.
How to configure Apache ?
All configuration for running Apache is stored in a text file named: httpd.conf is located in C: Apache conf, you can edit in a text editor such as Notepad, but a recommended program is Notepad + +, the best free software you can find.
You can download Notepad + + from here.
You have two options below :
1 – The first choice, the most simple, the following link to download a copy of the httpd.conf file, unzip, copy or move it to the folder C: Apache conf and replace the original file, and is ready to run the server.
2 – advanced alternative but not difficult, open the httpd.conf file and manually edit the following lines :
All lines beginning with # are comments in each section describes the options.
Line 52 “Listen” indicates the IP address and port that the server will receive requests, you can use in the following ways:
1 – The server will receive requests only from the same PC: Listen localhost: 80
2 – receive requests from other machines on a local network: Listen 80
In line 149 DocumentRoot is necessary to specify the path to the local folder containing the pages and files to serve, in your case will be the folder you created in C :/ web_server, would be as follows:
DocumentRoot “C :/ web_server”
Line 177 sets <Directory> permission to the directory above, would be:
This is the essential configuration parameters to start using Apache. Saves changes and reboots the server by clicking the notification area icon.