Wiki Home | Article | Discussion | View source | History

Install Apache on Windows

From HostPedia

Jump to: navigation, search

Contents

Introduction

Before manually installing apache, it might usful to get to know the alternatives. There are free software packages that do the job of configurating Apache Server, PHP and MySql automatically like xampp or other apache installers that could save you a lot of time

Download Apache

Get the latest version from http://www.apache.org/dist/httpd/binaries/win32/, the file name should have the windows installation extenstion ".msi" (for example: apache_2.2.6-win32-x86-no_ssl.msi).


Install Apache

Run the Apache installation file, then you will be prompt to enter your server information, as in the following (Optional values are written below):

Now, You are asked to choose between typical and customized installation, use the typical to install all of Apache features, if you wish to install only core parts of the software - choose customized.

Start Apache

After Installation, the server should start, notice that Apache's icon was added to the System Tray:

  • The Image:apache_start.gif icon means that the server is running.
  • The Image:apache_stop.gif icon means that the server is off.

Use this icon to Start, Stop or Restart Apache.


If you get the message "The requested operation has failed!" when Apache attempts to initialize - use the "Test Configuration" shortcut in the Start Menu to find what caused the error. Otherwise, your new server is now up and running.


Now, Open your web browser and write on of the following addresses:

if the server is working properly you should now be looking at the It Works! message.

Basic Apache Configuration

now, let's make Apache point to the directory of your choosing:

  • Open your Apache Folder, for example: C:\Program Files\Apache Software Foundation\Apache2.2\conf.
  • Open the file "httpd.conf" with a Text editor.
  • Search for "DocumentRoot" and change the deafult path to the location of your HTML files.
  • Now, Search for "<Directory" and change the following path to the same path you choose before for your HTML files. example: <Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs">.
  • Restart Apache.