How to install Apache 2 on Windows 10?
I have used the Apache Lounge distribution indicated in the official Apache 2 documentation (https://httpd.apache.org/docs/2.4/platform/windows.html)
These are the steps to install Apache on Windows using Apache Lounge distribution:
- Download Apache 2.4.37 Win64 (https://www.apachelounge.com/download/)
- Create folder C:/Apache24
- Unzip httpd-2.4.37-win64-VC15.zip in folder C:/Apache24
Option 1: To run it from the console:
- Open Windows Power Shell
-
Execute httpd.exe
PS > C:\Apache24\bin\httpd.exe
or
PS > cd C:\Apache24\bin PS > .\install.exe
Open http:\localhost or http:\127.0.0.1 in brwoser
The message It works! will be displayed
Option 2: To install it as a service:
- Open Windows Power Shell
-
Open Windows Power Shell as administrator
PS > Start-Process PowerShell -Verb RunAs
-
Install the service
PS > cd C:\Apache24\bin PS > .\httpd.exe -k install
-
Start the service
PS > .\httpd.exe -k start
or through the services administrator
PS > services.msc Select Apache2.4 > Right-click > Start
Open http:\localhost or http:\127.0.0.1 in brwoser
The message It works! will be displayed