Install and Configure Apache on Windows Server 2022 – Easy Setup

In this guide from the Windows Tutorials, we intend to teach you How To Install and Configure Apache on Windows Server 2022. Apache HTTP Server is a free and open-source web server that delivers web content through the internet. It is commonly referred to as Apache and after development, it quickly became the most popular HTTP client on the web.

Install and Configure Apache on Windows Server 2022

With this tutorial, you will learn to set up Apache on your Windows Server. Now follow the steps below provided by the Orcacore team to Install and Configure Apache on Windows Server 2022.

Installing Apache on Windows Server 2022

First, you need to download Apache from the ApacheLounge. Depending on your Windows Server, choose the 32 or 64-bit version of Windows.

Download Apache for windows

Note: Be sure you installed the latest 14.30.30704 Visual C++ Redistributable for Visual Studio 2015-2022.

When your download is completed, open your downloaded file and extract it to a suitable location like c:/Apache24, etc.

Now you need to make some configuration changes.

Configure Apache on Windows Server 2022

Now that you have extracted Apache on your Windows server, you need to configure it.

Open the conf subdirectory and open the httpd.conf file with a text editor like Notepad.

We assume that you have extracted the file in the c:/Apache24.

You need to update the ${SRVROOT} variable point to the new location like this:

Define SRVROOT "C:/Apache24"

Also, you need to locate the following lines and change them to the new location that you have extracted Apache:

ServerRoot "C:/Apache24"
DocumentRoot "C:/Apache24/htdocs" 
<Directory "C:/Apache24/htdocs"> 
ScriptAlias /cgi-bin/ "C:/Apache24/cgi-bin/"

After that you need to uncomment and set the server name point to your server name or its IP address:

ServerName www.example.com:80

Next, locate the following line and add the “ExecCGI” in front of it:

Options Indexes FollowSymLinks ExecCGI

After that, find the line below and uncomment it by removing the # from the beginning of the line:

AddHandler cgi-script .cgi

And also add the following line:

AddHandler cgi-script .pl

At the end of the file add the following line:

ScriptInterpreterSource Registry

When you are done, save and close the file.

Start Apache Service on Windows Server 2022

At this point, you have learned to Install and Configure Apache on Windows Server 2022. Now you can start Apache on your Windows Server 2022.

Open a command/PowerShell prompt in the “bin” folder at the location where you extracted Apache.

In a command prompt you can start Apache with the following command:

httpd.exe

You can start Apache in a PowerShell prompt with the following command:

& "c:\Apache24\bin\httpd.exe"

Now you can verify that your Apache is running on your server by typing 127.0.0.1 in your web browser.

http://127.0.0.1

You will see:

Check Apache on Windows Server

If you see this in your web browser means that your Apache is running on your Windows Server 2022.

Conclusion

Apache HTTP web servers are used by over 67% of all web servers in the world. Apache web servers are easy-to-customize environments, they’re fast, reliable, and highly secure. This makes Apache web servers a common choice by best-in-class companies.

At this point, you have learned to Install and Configure Apache on Windows Server 2022.

I hope you enjoy using it. Also, you may like to read the following articles:

Configure Hyper V in Windows Server 2022

Set up Multiple RDP sessions on Windows Server 2022

Allow Remote Desktop Connection Windows Server 2022

FAQs

What is Apache, and why should I install it on Windows Server 2022?

Apache is an open-source web server that offers flexibility and security for hosting web content. For this purpose, it is a good choice to Install and Configure Apache on Windows Server 2022.

How do I install Apache on Windows Server 2022?

You can download Apache from the Apache Lounge and follow the above step-by-step instructions (Install and Configure Apache on Windows Server 2022) to configure it on your server.

How do I verify if Apache is running successfully on Windows Server?

You can open a browser and enter http://127.0.0.1 to check if Apache is up and running.

Newsletter Updates

Enter your email address below and subscribe to our newsletter

4 Comments

Comments are closed.

Stay informed and not overwhelmed, subscribe now!