How to Install Apache Web Server on Windows?



Apache (HTTP Server) is one of the most widely used webserver in the world. In this article we will discuss how to install Apache on Windows.


How to download Apache?


The official Apache website (https://httpd.apache.org) does not provide any binary release, thus you will need to compile the source code on your own. Fortunately, some third-party websites offer the binary versions for us:

Apache Haus: https://www.apachehaus.com/cgi-bin/download.plx

Apache Lounge: https://www.apachelounge.com/download/

In this article we will download the binary from Apache Haus website. Download Apache 2.4.x OpenSSL 1.1.1 VS17 or Apache 2.4.x OpenSSL 3.0.x VS17.





How to Install Apache?



Step 1:

Extract the downloaded file: httpd-2.4.55-o111s-x64-vs17.zip or httpd-2.4.55-o307-x64-vs17.zip.


Step 2:

Inside the extracted folder you can find Apache24 folder.
Copy the Apache24 folder to root path (c:\) or any location you wish.


Step 3:

Open Command Prompt in administrator mode. In the search box on the taskbar, type command prompt, then select Run as administrator from the right-side menu.






Step 4:

Go to the installation bin directory (in our case, in the Command Prompt, type: cd C:\Apache24\bin).


Step 5:

Run the program httpd.exe.


Step 6:

The Windows Defender Firewall will prompt a notice noting that some features are being blocked on public and private networks. Check private networks checkbox and/or public networks checkbox, and then click the Allow access button.





How to test your Apache installation?


Congratulations, your Apache installation is already finished. To check if everything is working properly, open a web browser and enter your server address: http://localhost. If no error is found, you should see the Apache Haus test page.





How to add Apache server as a Windows service?


If you want to run Apache at Windows startup, you need to add Apache as a Windows service. Follow the following steps:

Open Command Prompt in administrator mode as before and go to C:\Apache24\bin. Run httpd.exe -k install.