ECMS V3

This page is brought to you by ECMS V3 - Next Generation Web Management (http://www.evaria.com/). When printing this page (http://www.evaria.com/v3/index/article/17),
you must include the entire legal notice at bottom.

39
district-librarian

How to install Apache on Windows

This article explains how to install, configure and run Apache 2.0 under Microsoft Windows. Note! Running Apache on Windows 9x is not thoroughly tested, and it is never recommended on production systems.

6 Published 09.11.2005 - Last edited 15.08.2006 - 47185 views - 8 comments

Information on the latest versions of Apache can be found on the web site of the Apache web server at http://httpd.apache.org/download.cgi. There you will find the current release, as well as more recent alpha or beta test versions, and a list of HTTP and FTP mirrors from which you can download the Apache web server. Please use a mirror near to you for a fast and reliable download.

For Windows installations you should download the version of Apache for Windows with the .msi extension. This is a single Microsoft Installer file, which contains a ready-to-run version of Apache. If you plan on installing PHP4 or PHP5 I recommend downloading version 2.0.5x as version 2.2.x isn´t working "out-of-the-box" yet with PHP as PHP needs to update their main *.dll to work with the new Apache server.

Run the Apache .msi file you downloaded above. The installation will ask you for these things:

  • Network Domain. Use localhost or 127.0.0.1 for your local installation.
  • Server Name. Use the same as above.
  • Administrator´s Email Address. Enter your desired email address here. This address will be displayed along with error messages to the client by default.
  • For whom to install Apache Select for All Users, on Port 80, as a Service - Recommended if you´d like your new Apache to listen at port 80 for incoming traffic. It will run as a service (that is, Apache will run even if no one is logged in on the server at the moment).
  • The installation type. Select Typical as this will cover most of your needs. A full install will require about 13 megabytes of free disk space. This does not include the size of your web site(s).
  • Where to install. The default path is C:\Program Files\Apache Group under which a directory called Apache2 will be created by default. I like to keep it seperate from basic apps since this will be my local web directory. Therefore I normally choose C:\Apache2.

During the installation, Apache will configure the files in the conf subdirectory to reflect the chosen installation directory. However, if any of the configuration files in this directory already exist, they will not be overwritten. Instead, the new copy of the corresponding file will be left with the extension .default. So, for example, if conf\httpd.conf already exists, it will be renamed as conf\httpd.conf.default. You can install Apache as a service automatically during the installation. Do that! After the installation you should manually check to see what new settings are in the .default file, and if necessary, update your existing configuration file.

Also, if you already have a file called htdocs\index.html, it will not be overwritten (and no index.html.default will be installed either). This means it should be safe to install Apache over an existing installation, although you would have to stop the existing running server before doing the installation, and then start the new one after the installation is finished.

After installing Apache, you can edit the configuration files in the conf subdirectory if required. These files will be configured during the installation so that Apache is ready to be run from the directory it was installed into, with the documents server from the subdirectory htdocs.

After starting Apache (either in a console window or as a service) it will be listening on port 80 (unless you changed the Listen directive in the configuration files or installed Apache only for the current user). To connect to the server and access the default page, launch a browser and enter this URL:

http://localhost/

Apache should respond with a welcome page and a link to the Apache manual. If nothing happens or you get an error, look in the error.log file in the logs subdirectory. If your host is not connected to the net, or if you have serious problems with your DNS (Domain Name Service) configuration, you may have to use this URL:

http://127.0.0.1/

Once your basic installation is working, you should configure it properly by editing the files in the conf subdirectory. Again, if you change the configuration of the Windows NT service for Apache, first attempt to start it from the command line to make sure that the service starts with no errors.

Because Apache cannot share the same port with another TCP/IP application, you may need to stop, uninstall or reconfigure certain other services before running Apache. These conflicting services include other WWW servers and some firewall implementations.

More information on how to edit the configuration files in the conf subdirectory will follow with related articles as how to install PHP and mySQL on Windows, and also how you create virtual web directories and aliases.


1 | Thursday 10 Nov 2005 17:49:12 | Max has this to say:

Great work on this one!

Seams like having your own server isn't such a big deal...

Really looking forward to catch up on how you get PHP and mySQL running on Apache. Suppose those are the next tutorials to come?!
2 | Wednesday 15 Feb 2006 22:39:29 | lsabug has this to say:

Question, if you use localhost or 127.0.0.1 will you be able to access this site from the internet or do you have to connect via the machine? Thanks.
3 | Thursday 16 Feb 2006 09:46:33 | Thomas has this to say:

When running on localhost (127.0.0.1) you can't access the server from outside (the Internet).

In order to do so you'll have to have your own DNS. This you'll have to buy and register, so that when someone types in your DNS (e.g. 123.123.123.123 or www.yourdomain.com) they're taken to your computer.

The whole point of setting up Apache like this article explains is to have your own test server so you can run your "site" offline and verify that pages/script are working properly before you decide to upload them to your site on the Internet.
4 | Monday 07 Aug 2006 07:45:55 | Hit Lyrics of Famous Stars has this to say:

after installink mySQL, my system is sending more data on network. Is it any kind of virus or something else? I am in trouble.
5 | Saturday 26 Aug 2006 19:04:14 | Ebrahim has this to say:

Ofcourse you can visit the access apache server from anywhere (internet).

Just know your global IP by visiting a site like http://www.whatismyip.com

Whatever you see there, replace it with "127.0.0.1 or localhost".

Hope that helps.
6 | Saturday 23 Dec 2006 19:12:03 | Dave has this to say:

I just installed Apache 2.2.3 on my local computer running Windows XP Pro.

I have several websites. How do I set them up for local testing?

My ISP is Comcast

Also how do I actually replace my global IP? It's the one that came with my vonage box.

Thanks
Dave
7 | Saturday 23 Dec 2006 19:42:35 | Dave has this to say:

Ok what I did was copied all my files to 'C:Program FilesApache Software FoundationApache2.2htdocs'

So I guess I am on my way.

In the past I've installed Apache on Windows 98 but I remember back then I could text my cgi files but not my email. Is it possible i can do that now?

Also if i can get a list of what can and cannot be tested on my local pc would be appreciated.

Also I changed

DirectoryIndex index.html


to .htm but it still did not work for that file type.

Thanks again
Dave
8 | Sunday 14 Dec 2008 10:24:10 | adnan has this to say:

pls send to me any information how install apache on email

Name:

Email: hidden

Website:

Comment:

Please enter these letters here (Case sensitive) *

While we are updating content in the new site, the original Evaria site can be accessed via this link.

Page generated in 0.059s

evaria.com © 1999-2012 HTML CSS Contact us Back to top