How to Install Apache Web Server on Windows 11

Installing the Apache Web Server on your Windows 11 computer involves downloading the Apache HTTP Server, configuring it, and starting the server. Follow these steps to download and install Apache:

Step 1: Open Google Chrome

  1. Click on the Start menu (Windows icon) at the bottom-left corner of your screen.
  2. Type "Google Chrome" in the search bar.
  3. Click on Google Chrome to open the browser.

Step 2: Go to the Apache Download Page

  1. In Google Chrome, go to the address bar at the top of the browser window.
  2. Type https://www.apachelounge.com/download/ and press Enter.

Step 3: Download Apache HTTP Server

  1. On the Apache Lounge download page, find the section for the latest version of Apache HTTP Server.
  2. Click on the httpd-2.4.xx-win64-VS16.zip link to download the ZIP file. (Make sure to download the version compatible with your system and Visual Studio runtime.)
  3. The download will start automatically. If prompted, click Save to save the ZIP file to your computer.

Step 4: Extract the Apache ZIP File

  1. Once the download is complete, navigate to your Downloads folder.
  2. Right-click on the downloaded httpd-2.4.xx-win64-VS16.zip file and select Extract All.
  3. Choose the destination folder where you want to extract the Apache files and click Extract.

Step 5: Configure Apache HTTP Server

  1. Navigate to the folder where you extracted the Apache files (e.g., C:\Apache24).
  2. Open the conf folder and locate the httpd.conf file.
  3. Open the httpd.conf file in a text editor (e.g., Notepad).

Step 6: Edit the Configuration File

  1. In the httpd.conf file, find the line that starts with #ServerName and remove the # to uncomment it. Change it to:
    ServerName localhost:80
    
  2. Save and close the httpd.conf file.

Step 7: Install Apache as a Windows Service

  1. Open the Start menu and type "cmd" in the search bar.
  2. Right-click on Command Prompt and select Run as administrator.
  3. In the Command Prompt window, navigate to the Apache bin directory by typing:
    cd C:\Apache24\bin
    
  4. Install Apache as a service by typing:
    httpd.exe -k install
    

Step 8: Start the Apache Service

  1. In the Command Prompt window, start the Apache service by typing:
    httpd.exe -k start
    

Step 9: Verify the Installation

  1. Open Google Chrome and type http://localhost in the address bar, then press Enter.
  2. You should see the Apache default welcome page, indicating that the server is running.

Step 10: Manage Apache Service

  1. You can stop the Apache service by typing in the Command Prompt:
    httpd.exe -k stop
    
  2. To restart the service, type:
    httpd.exe -k restart
    

Conclusion

You have successfully installed the Apache Web Server on your Windows 11 computer. You can now start configuring and using Apache to serve your web applications and sites.


Comments