The local server is used by web developers to debug scripts and test sites and web programs. One of the most widespread and functional packages is Apache, the advantages of which are the presence of a large number of modules and the openness of the code.
Go to the official Apache developers site. On the page that opens, in the left part of the window, click on the From a mirror link of the Download item. Download the latest distribution for Windows.
Run the downloaded file. Accept the terms of the license agreement, click Next. Enter the domain name, server name and email address of the administrator. To install only as a local server, specify localhost in the first two lines. The port number can be left unchanged.
In the next window, select the standard installation method. Specify the directory for unpacking the server, it is advisable to create a separate folder that will be convenient for you to use in the future (for example, C: / Apache). Click on the Install button and wait for the installation to complete.
Windows automatically starts Apache as a service immediately after installation. After the message about the completion of copying files, enter the address http:// localhost in the address bar of your browser. If the installation was successful, you will see a corresponding message on the screen.
Go to "Start" - "Settings" - "Control Panel" - "Administrative Tools" - "Services". In the window that appears, right-click on the line Apache2. To stop the server, click on "Stop", to start - "Start".
The main server parameters are configured in the httpd.conf file, which is located in the conf folder of the Apache installation directory. Using the directives of this document, you can change the port, name and location of the main program folder. You can also specify the directory where your project files should be placed. Using a container, you can set parameters for running multiple sites.