How to Install Apache on a Windows Server

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/

To continue with the configuration, visit the related article for this video here: https://www.liquidweb.com/kb/how-to-install-apache-on-a-windows-server/

For more information about this and other topics, visit us at https://www.liquidweb.com/kb/ or for more information about our VMWare private cloud visit: https://www.liquidweb.com/products/private-cloud/

Video by: Justin Palmer

You May Also Like