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. 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.
4. Navigate to extracted Apache24 directory.
4. Navigate to bin using cd bin.
5. Run the program using command prompt httpd.exe -k install.