Apache Web Server 2.4



The Apache HTTP Server ('httpd') was launched in 1995 and it has been the most popular web server on the Internet since April 1996. It has celebrated its 25th birthday as a project in February 2020. The Apache HTTP Server is a project of The Apache Software Foundation. Apache httpd 2.4.46 Released 2020-08-07 ΒΆ. The Apache HTTP Server 2.4.18 through 2.4.20, when modhttp2 and modssl are enabled, does not properly recognize the 'SSLVerifyClient require' directive for HTTP/2 request authorization, which allows remote attackers to bypass intended access restrictions by leveraging the ability to send multiple requests over a single connection and aborting.

Mar 5, 2014 Web DevelopmentNick VogtComments (6)
Please note that this post is over a year old and may contain outdated information.
This is a quick and easy guide for installing the latest Apache server (httpd) on your Windows computer. This guide was written specifically for Windows 7, but the steps should be similar for Windows 8 and other versions.

Step 1


If you do not already have it, download the Visual C++ Redistributable for Visual Studio 2012 and install it. You can check if you already have it by going to the Programs and Features control panel, and looking for 'Microsoft Visual C++ 2012 Redistributable'. This Microsoft software package contains dependencies for the Windows version of Apache server.

Step 2


Download the latest Apache server (httpd) from Apache Lounge. If you are not sure if you need the Win64 or Win32 version, click on your Start Menu, right-click on Computer, and click Properties. Under System Type, it will tell you if you have a 32-bit or 64-bit system.
You might wonder why you are downloading from Apache Lounge and not the official Apache site. Apache Lounge distributes Windows versions of the latest Apache build. You can download from the official Apache site, but will then need to compile your own build, which is well beyond the scope of this guide.
At the time of writing, the latest version of Apache server (httpd) available at Apache Lounge is 2.4.7, so that version will be referenced in this guide. If you have a newer version, you should be able to simply substitute it, unless major changes have been made.

Step 3


You should now have a zip file named httpd-2.4.7-win32-VC11.zip or similar in your download folder. Extract the Apache24 folder it contains to your desired location for your server to run. I simply put it in the Program Files folder, so my path to it looks like:
C:/Program Files/Apache24
From this point on I'll assume you have your Apache server in the same folder. If not, adjust accordingly.

Step 4


Now to configure your server. Inside the Apache24 folder is a conf folder, with a file called httpd.confWeb. That is the main configuration file. Open it in a text editor as you'll need to make a handful of edits:
ServerRoot
Find the line that starts with ServerRoot (approximately line 37). Change it to:
ServerRoot 'C:/Program Files/Apache24'
ServerName
Find the line that contains ServerName (approximately line 217). Remove the pound sign (#) that precedes it. Then change it to:
ServerName localhost:80
This will mean that you access your web server by typing localhost into your browser (http://localhost/).
DocumentRoot
The document root is where Apache looks for your website files. Find the line that starts with DocumentRoot (approximately line 241). Change it to reflect the position of your document root, which should be:
DocumentRoot 'C:/Program Files/Apache24/htdocs'
Then change the line directly below it to match the new position:
<Directory 'C:/Program Files/Apache24/htdocs'>
DirectoryIndex
Scroll down to the line that has DirectoryIndex index.html (approximately line 275). Add index.php in there or any other files you need your server to recognize as index files. For example:
DirectoryIndex index.php index.html

Step 5


Navigate to the following folder:
C:/Windows/System32/drivers/etc
Open the hosts file with a text editor and add the following line before everything (on its own line):
127.0.0.1 localhost
This tells windows that when you try to navigate to localhost in a browser, it should direct the requests to your own computer (which your server now resides on). Learn more about the hosts file here.

Step 6


Your server is now configured and should be functional. Start it by opening the following file:
C:/Program Files/Apache24/bin/httpd.exe
It should be a blank black window. This is good, meaning there were no error messages. Keep it minimized while you want your server to be running. You can stop your server by closing the window.
With your server running, you can use localhost (type it into your browser, like: http://localhost/) to access your web files. Your server uses the web files in your htdocs folder, which is here:
C:/Program Files/Apache24/htdocs
There will already be a simple HTML file in there.

Additional Configuration


Apache Web Server 2.4.43

You my want to move your document root somewhere other than the default htdocs folder. To do this, open the httpd.conf file again and change the location for the DocumentRoot and the following line (approximately lines 241 and 242).
I use wwwroot for my document root because I originally started on IIS. So my document root is at:
C:/wwwroot
You can have it anywhere you want.
mod_rewrite
If you want to enable mod_rewrite on your Apache server, search for the line that contains mod_rewrite.so (in httpd.conf) and remove the preceding pound sign (#).
One last thing. Any changes you make to the httpd.conf file will require a restart of the web server (close it and open it again) to take effect.

The Apache HTTP Server Project is an effort to develop and maintain anopen-source HTTP server for modern operating systems including UNIX andWindows. The goal of this project is to provide a secure, efficient andextensible server that provides HTTP services in sync with the current HTTPstandards.

The Apache HTTP Server ('httpd') was launched in 1995 and it has been the most popular web server on the Internet sinceApril 1996. It has celebrated its 25th birthday as a project in February 2020.

The Apache HTTP Server is a project of The Apache SoftwareFoundation.

The Apache Software Foundation and the Apache HTTP Server Project arepleased toannounce therelease of version 2.4.46 of the Apache HTTP Server ('httpd').

This latest release from the 2.4.x stable branch represents the best availableversion of Apache HTTP Server.

Apache HTTP Server version 2.4.43 or newer is required in order to operate a TLS 1.3 web server with OpenSSL 1.1.1.

Download | ChangeLog for2.4.46 | Complete ChangeLog for2.4 | New Features in httpd2.4

As previously announced, the Apache HTTP Server Project has discontinuedall development and patch review of the 2.2.x series of releases.

The Apache HTTP Server Project had long committed to provide maintenancereleases of the 2.2.x flavor through June of 2017. The final release 2.2.34was published in July 2017, and no further evaluation of bug reports orsecurity risks will be considered or published for 2.2.x releases.

Apache Web Server 2.4 Login

Great! We have updated our download page in an effort tobetter utilize our mirrors. We hope that by making it easier to use our mirrors, we will be able to provide a better download experience.

Please ensure that you verify your downloads usingPGP or MD5 signatures.

Awesome! Have a look at our current 'Help Wanted' listings then: