How to Install Apache on a Windows Server

October 2, 2020 Liquid Web

When looking to host websites or services from a Windows server, there are several options to consider. It is worth reviewing the strengths and weaknesses of each server type to determine which one is most likely to meet your particular needs before you spend the time installing and configuring a web service.

In this video, we demonstrate how to install Apache on a Windows server.

Commands used:

https://www.apachehaus.com/downloads/httpd-2.4.43-o111f-x86-vc15.zip
https://aka.ms/vs/15/release/vc_redist.x64.exe

1. Extract the compressed Apache download. While you can extract it to any directory it is the best practice to extract it to the root directory of the drive it is located on (our example folder is located in C:\Apache24). This is the location we will be using for these instructions. Please note that once installed you can see Apache’s base path by opening the configuration file and checking the “ServerRoot” directive).apache_extract

2. Open an “Administrator” command prompt. (Click the Windows “Start” icon, then type “cmd”. Right-click the “Command Prompt” item which appears, and select “Run As Administrator.”)

3. Change to the installation directory (For our purposes C:\Apache24\bin).

4. Run the program httpd.exe. 

5. You will likely notice a dialogue box from the Windows Firewall noting that some features are being blocked. If this appears, place a checkmark in “Private Networks…” as well as “Public Networks…”, and then click “Allow access.”

6. As noted in the ApacheHaus instructions:
“You can now test your installation by opening up your Web Browser and typing in the address: http://localhost. If everything is working properly, you should see the ApacheHaus’ test page.“

7. Now that you have confirmed the Apache server is working and shut it down, you are ready to install Apache as a system service.

8. In your Command Prompt window, enter (or paste) the following command: httpd.exe -k install -n "Apache HTTP Server"

9. From your Command Prompt window enter the following command and press ‘Enter.’ services.msc

10. Look for the service “Apache HTTP Server.” Looking towards the left of that line you should see “Automatic.” If you do not, double-click the line and change the Startup Type to “Automatic.”

11. Restart your server and open a web browser once you are logged back in. Go to this page in the browser’s URL bar: http://localhost/

Video by: Justin Palmer

About the Author

Liquid Web

Liquid Web powers online content, commerce, and potential for SMB entrepreneurs and the designers, developers and digital agencies who create for them. Sign up for our <a href="https://www.liquidweb.com/blog">newsletter</a> to stay up to date with our latest content.

More Content by Liquid Web
Previous Video
Apache Performance Tuning: Swap Memory
Apache Performance Tuning: Swap Memory

In this video, we will demonstrate how to preform fine tuning on an Apache server to avoid thrashing.

Next Video
An Introduction to Firewalld
An Introduction to Firewalld

In this video, we explain many aspects of firewalld, including starting, stopping, management, and configur...

Learn What Qualities to Look for in Your Next Host in Our New Guide!

Download Now