1. Home
  2. Knowledge Base
  3. Application
  4. How to install Apache on Windows?

How to install Apache on Windows?

Apache server is a web server responsible for serving requests of web assets and content using HTTP. It is also known as HTTP Server. Apache server is maintained by open source community and released under Open Source Apache license as it is 100% free to use, best in the market hence it used by on high demands. In this article, you will learn about: How to install Apache on Windows?

Prerequisites

Visual C++ Installation: Before processing the installation of apache on the windows server, first, you need to install Visual C++ on the windows server.  Learn: How to install Visual C++ on Windows Server? Apache Installer: Download the apache installer compressed file from the below link. Download: https://www.apachehaus.com/downloads/httpd-2.4.46-o111j-x86-vc15.zip Update Windows: We highly recommend updating windows to its latest version. Learn: How to Apply Windows Updates For Server 2012 R2, 2016?
1. After downloading the Compressed Apache → Extract it using default or preffered extraction tool to C:\ Drive. extract-the-apache-on-windows
navigate-to-local-c-drive-windows-server
2. Navigate and Open Apache24\Conf\httpd.conf. Edit the file with following changes,
#ServerName www.example.com:80

ServerName localhost

# AllowOverride controls what directives may be placed in .htaccess files.

# It can be “All”, “None”, or any combination of the keywords:

#   AllowOverride FileInfo AuthConfig Limit

AllowOverride None

# AllowOverride controls what directives may be placed in .htaccess files.

# It can be “All”, “None”, or any combination of the keywords:

#   AllowOverride FileInfo AuthConfig Limit

AllowOverride All

#LoadModule rewrite_module modules/mod_rewrite.so

LoadModule rewrite_module modules/mod_rewrite.so
3. Now, open Command Prompt (CMD) as Administrator. open-cmd-as-administrator 4. Navigate to extracted Apache24 directory. navigate-to-apache-24 4. Navigate to bin using cd bin. navigate-to-bin 5. Run the program using command prompt httpd.exe -k install. run-httpd-install-k

Allow Port In Firewall

1. Log in to Windows Server → Start → Administrative Tools → Windows Firewall with Advanced Security. navigate-to-start-administrative-tool open-windows-firewall-and-advanced-firewall 2. Navigate to Windows Firewall with Advanced Security  Inbound Rules. Allow Incoming Connections Of Program From Windows VPS / Server Firewall 3. To create new rule, Click on “New Rule“. click-on-new-rule-inbound-firewall-rule 4. Select TCP → In Specific Local Port, Enter: 80, 8080, 443 → Click on Next. Protocols-and-ports-section-windows-firewall 5. In Action, select Allow Connections → Click on Next. Allow the connection: This includes connections that are protected with IPsec as well as those that are not. Allow the connection if it is secure: This includes only connections that have been authenticated by using IPsec. Connections will e secured using the settings in IPsec properties and rules in the Connection Security Rule node. Action-tab-select-allow-connections 6. In the Profile tab, you need to select the below options and click “Next“, Domain: This applies to when the computer connected to the corporate domain. Private: This applies to when the computer connected to the private network. Public: This applies to when the computer connected to the public network. Profile-section-firewall-windows 7. In the Name section, you need to specify Name for your Custom Rule → Finish. Name-firewall-rules
Updated on October 9, 2021
Need Support?
Can't find the answer you're looking for? Don't worry we're here to help!
CONTACT SUPPORT