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:

  1. Download Apache 2.4.37 Win64 (https://www.apachelounge.com/download/)
  2. Create folder C:/Apache24
  3. Unzip httpd-2.4.37-win64-VC15.zip in folder C:/Apache24

Option 1: To run it from the console:

  1. Open Windows Power Shell
  2. Execute httpd.exe

    PS > C:\Apache24\bin\httpd.exe
    

    or

    PS > cd C:\Apache24\bin
    PS > .\install.exe
    
  3. 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:

  1. Open Windows Power Shell
  2. Open Windows Power Shell as administrator

    PS > Start-Process PowerShell -Verb RunAs
    
  3. Install the service

    PS > cd C:\Apache24\bin
    PS > .\httpd.exe -k install
    
  4. Start the service

    PS > .\httpd.exe -k start
    

    or through the services administrator

    PS > services.msc
    Select Apache2.4 > Right-click > Start
    
  5. Open http:\localhost or http:\127.0.0.1 in brwoser

The message It works! will be displayed