Vous êtes sur la page 1sur 3

Home Javascripts PHP Scripts Apache on Windows Login

How to install Apache Server on Windows


Apache on Windows
Installing Apache January 3, 2010 - 5:57pm — ricocheting

Installing PHP Note


Installing MySQL Those of you interested in the Apache 2.0.X tutorial, it has
Installing Perl been abandon and I will no longer keep it updated, but it
can be found here.
Other Software
Sharing Server

FAQ & Tips Apache 2.2.X


1. Download & Unpack
Go to http://www.apache.org/dist/httpd/binaries/win32/ and
choose a mirror. You want the latest win32-x86-no_ssl.msi
"MSI Installer Package" release.

My file was named: apache_2.2.11-win32-x86-no_ssl.msi

NOTE

Apache sometimes moves the "quick download" link to


the win32 binary. The long way to officially find it is
Download > Other files > binaries folder (not the
"Binary Releases" info link at the top) > win32 folder
> then the latest win32-x86-no_ssl.msi release

2. Install
When you install Apache, you'll get a prompt for "Server
Information." Here is the settings I used:

Network Domain: localhost


Server Name: localhost
Admin Email: (any email. real or fake)

[checked]: for All Users, on Port 80, as a Service

3. Starting/Stopping Apache
After installing, Apache2 automatically starts. The icon in the
System Tray means it started. The icon means the "Monitor
Apache Servers" is running, but Apache2 isn't started.

You can easily start/stop/restart Apache and Apache2 via that


icon in your System Tray. If you get "The requested operation
has failed!" error while starting apache use the "Test
Configuration" shortcut in the Start Menu to find the error (if the
text window pops up then closes before you can read it, your
config file is fine).
4. Testing
Now the ultimate test. To see if it's serving. Open your browser
and head to: http://127.0.0.1/ or http://localhost/

If it shows the It works! you have your server software


installed and running.
5. Making Apache point to your files
Using Notepad open C:/Program Files/Apache Software
Foundation/Apache2.2/conf/httpd.conf (in the start-menu there
should also be a "Apache HTTP Server 2.2 > Configure Apache
Server > Edit the Apache httpd.conf Configuration File" shortcut)
and search for DocumentRoot. Change it from something like
DocumentRoot "C:/Program Files/Apache Software
Foundation/Apache2.2/htdocs" to the location where your
HTML files and site are located. In my case: DocumentRoot
"C:/public_html"

NOTE

The first time i installed Apache2, i accidentally


changed ServerRoot. Make sure you change the
correct line which is DocumentRoot and which is down
about line 150.

6. Then scroll down about one page and change: <Directory


"C:/Program Files/Apache Software
Foundation/Apache2.2/htdocs"> to point to the same location
you set DocumentRoot to in the last step. Restart apache to
make the changes take effect

Add new comment WAMP

Comments

Fixing Skype to July 14, 2010 - 11:58pm — Anonymous reply


work with Apache
I was getting the pop up window that Apache Server couldn't start;
"The requested operation has failed!" yet the "Test Configuration" text
window popped up quickly and went away with no configuration errors.

After some messing around, and per my exiting Skype, Apache worked!
By default Skype and Apache both want to use Port 80...

You can change Skype to not use port 80 by clicking Tools > Options >
Advanced > Connection. Uncheck "Use port 80 and 443 as alternatives
for incoming connections."
It worked for me! :-)

Fixing "cannot June 22, 2010 - 6:43pm — Anonymous reply


edit/create ... http.conf file" error
Hey there, great tutorial! Everything went smooth as silk except for one
little hiccup, and I'd like to post the solution for anyone else who might
have this problem.

After installing Apache successfully, when trying to edit and save the
httpd.conf, an error pops up saying something like:

Cannot create the C:\Program files\apache Software


Foundation\apache2.2\conf\httpd.conf file
Make sure the path and file name are correct

The reason this happens is because by default users do not have write
permissions for this file. All you have to do is right click on httpd.conf,
click properties, select the security tab, click edit, select users, and then
check Full Control - Allow.

Hope this helps! For reference I'm using Windows Vista (yes, I know I
know, don't get me started...)

Scripts & design created 2000-2010 ricocheting.com :: Use Policy

Vous aimerez peut-être aussi