Setting up Apache 2.4 in Windows 10

Background

The aim is to setup a simple webserver under windows 10, and not get lost in the Apache documentation as a first timer – so I’ll document what happens here.

Summary steps

  • Download the 64-bit version from Apache Haus.
  • Extract it to a directory (e.g. c:\dev\) – which gives c:\dev\Apache24.
  • Edit the c:\dev\Apache24\conf\httpd.conf file to reflect the correct path (line 39).
  • Run httpd.exe from the command prompt.

Details

Use these if the pages/links change, so that you can re-create the steps.

Download

When you find the download link on the Apache homepage there is a link to “Files for Microsoft Windows” – which will get us close to where we want to get to. However – even this directs us to one of five options, and from there you are at a home page and feels like you are starting all over again.

I picked a random one (Apache Haus) and downloaded the 64-bit version.

Extract

The file is a zip file in your downloads folder.

The default would be to extract the files to a c:\Apache24 folder – and this is what the documentation expects.

The default expects paths of c:\Apache24 where I have paths of c:\dev\Apache24 after the zip file is extracted to c:\dev.

Configure

The primary file to use when configuring for the first launch is the c:\dev\Apache24\conf\httpd.conf file.

Edit this and change line 38 to use the new folder location:

Define SRVROOT "/dev/Apache24"
ServerRoot "${SRVROOT}"

Save the changes.

Run

Open up a command prompt and navigate to the c:\dev\Apache24\bin directory

Run httpd.exe:

RunningHttpd

If there are no errors/warnings then the cursor sits on the next file.

Test

Just open a browser and type in

http://localhost

You should see content if it works.

 

 

 

 

 

 

Advertisements
This entry was posted in Apache and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s