How to Install Apache Server on Windows _ Ricocheting
-
Upload
marko-cvijovic -
Category
Documents
-
view
216 -
download
0
Transcript of How to Install Apache Server on Windows _ Ricocheting
3/3/2014 How to install Apache Server on Windows | ricocheting.com
http://www.ricocheting.com/how-to-install-on-windows/apache 1/9
How to install Apache Server onWindowsSubmitted by ricocheting (/user/1) on January 4, 2011 - 12:38am
Note
Those of you interested in the Apache 2.0.X tutorial, it has been abandon
and I will no longer keep it updated, but it can be found here (/how-to-
install-on-windows/apache2.0).
Apache 2.2.X
1. Download & Unpack
Go to http://www.apache.org/dist/httpd/binaries/win32/
(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: httpd-2.2.21-win32-x86-no_ssl.msi
NOTE about finding the download links
Apache sometimes moves the "quick download" link to the win32
binary. The long way to officially find it is Download
(http://httpd.apache.org/download.cgi) > 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
3/3/2014 How to install Apache Server on Windows | ricocheting.com
http://www.ricocheting.com/how-to-install-on-windows/apache 2/9
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 installation Apache2 will automatically start. 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/ (http://127.0.0.1/) or http://localhost/ (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 (file:///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
3/3/2014 How to install Apache Server on Windows | ricocheting.com
http://www.ricocheting.com/how-to-install-on-windows/apache 3/9
June 22, 2010 - 6:43pm — Anonymous
"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 175.
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
WAMP (/how-to-install-on-windows)
CommentsFixing "cannot edit/create http.conf file" error
(access denied) (/comment/607#comment-607)
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.conffileMake 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...)
3/3/2014 How to install Apache Server on Windows | ricocheting.com
http://www.ricocheting.com/how-to-install-on-windows/apache 4/9
February 14, 2012 - 11:02am — ggharis
July 14, 2010 - 11:58pm — Anonymous
October 13, 2010 - 3:39pm — Anonymous
November 20, 2010 - 7:09pm — Anonymous
Windows 7 (/comment/2989#comment-2989)
In Windows 7, setting permissions and taking ownership of the file did not
let me save it. I had to "run Notepad as administrator' even though I was
logged on as an administrator. Then it worked normally. I really hate Win7.
Fixing Skype to work with Apache
(/comment/729#comment-729)
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! :-)
Fantastic! Thanks
(/comment/1132#comment-1132)
Same issue for me with Skype! Thanks for the tip!! :-)
[admin edit]
To save space, I'm pruning multiple replies thank you replies. Sufficient to
say there have been MANY people who found this info use. Really
appreciate the original poster sharing this info.
DocumentRoot directory not recognized
(/comment/1310#comment-1310)
I can't seem to get the server to recognize changes to the httpd.conf file... I've
changed the value of DocumentRoot as below:
3/3/2014 How to install Apache Server on Windows | ricocheting.com
http://www.ricocheting.com/how-to-install-on-windows/apache 5/9
November 23, 2010 - 1:43pm — ricocheting (/user/1)
December 5, 2010 - 1:06pm — Anonymous
DocumentRoot "D:/webroot"
(And updated the corresponding entry to match.)
However, no matter how many times I've tried this the server still looks for
files in the default location of "C:/Program Files/Apache Software
Foundation/Apache2.2/htdocs". I've tried editing with various different
programs. Have ensured that the server is stopped when I make the changes,
tried with and without a trailing "/", and using a "\" instead of "/". Every so
often when I open the file, it seems to have reverted to the original settings,
but I haven't found a patten to what makes that happen.
Also installed AppacheConf and pointed it at the httpd.conf file... Whenever I
inspect the configuration from there, the settings reflect the default htdocs
location, but when I open the same file using notepad or pspad, I see the
settings I've noted at the top.
Running Windows 7 Home Premium (x64). Appache is version 2.2.
Any suggestions? I'm pulling my hair out! (What's left of it, anyway.)
Corey
Answer
(/comment/1318#comment-1318)
Are you sure positive you are editing the right file? because there is a
httpd.conf (which Win7 might hide the .conf extension) and there is also
generally a httpd-sample.conf or httpd-default.conf or other very-similarly
named files in the same folder.
did you try opening the config file with the shortcut in the start menu? Also
search all the way through the file and make sure there isn't more than one
occurrence of DocumentRoot (apache will use the last one it finds in a file
while you might be editing the first one).
unhiding of file extension
(/comment/1364#comment-1364)
3/3/2014 How to install Apache Server on Windows | ricocheting.com
http://www.ricocheting.com/how-to-install-on-windows/apache 6/9
December 9, 2010 - 5:27pm — lpstep
January 3, 2011 - 7:43pm — ricocheting (/user/1)
Windows XP, Vista, and Win7:
Navigate to windows control panel, and find an item of "folder options"
or something similar.
Open it, and go to "View", here you must unselect "Hide extensions for
known file types".
It is also worth mentioning that I had to give myself admin rights to
modify file in the folder of the httpd.conf file for me to edit it. ( I have
Win7 pro)
Question: Getting SSI to work
(/comment/1374#comment-1374)
I thank you for the newbie-friendly instructions. The installation went smoothly
and Apache works as expected. However the SSI does not work for my shtml
files. The browser (Firefox) just shows the page code. What do I do to
hhtp.confd to enable SSI?
Thanks,
Len Stephan
Answer: Enabling SSI
(/comment/1435#comment-1435)
you need to do two things to enable SSI
1) The first step, you need to add Includes to the end of your main Options
line. In httpd.conf look inside the <Directory "C:/public_html"> folder settings,
there should be a line like Options Indexes FollowSymLinks (about line 219) and
you want to add Includes to the end so it looks similar to Options Indexes
FollowSymLinks Includes
2) The second step is to uncomment two lines under the mime_module
section. So:#AddType text/html .shtml#AddOutputFilter INCLUDES .shtml
becomesAddType text/html .shtml
3/3/2014 How to install Apache Server on Windows | ricocheting.com
http://www.ricocheting.com/how-to-install-on-windows/apache 7/9
January 6, 2011 - 12:30pm — Anonymous
January 6, 2011 - 12:52pm — ricocheting (/user/1)
March 10, 2011 - 12:09pm — Anonymous
March 11, 2011 - 5:31pm — ricocheting (/user/1)
AddOutputFilter INCLUDES .shtml
Restart Apache and SSI should be enabled for .shtml files.
No "It Works" message displayed!!!
(/comment/1448#comment-1448)
hey, I have performed all the steps for the installation but I seem to be having
problems while trying to get the it works message to display, when I type in
http://localhost/ (http://localhost/) in the address bar it says it could not find
the address. But when I try pinging it from the command prompt it works fine.
I have tried everything, I even tried clearing the browser cache. Any
suggestions with regard to this problem are welcome...
Answer: localhost not working on
Win7 (/comment/1449#comment-1449)
Just curious, are you on Windows 7? and does it work if you use
http://127.0.0.1/ (http://127.0.0.1/)
If you have Windows 7 and using http://127.0.0.1/ (http://127.0.0.1/)
works, but you want to use http://localhost/ (http://localhost/) instead (or
in addition to) then you need to edit the file:C:\Windows\System32\drivers\etc\hosts
and change the line:# 127.0.0.1 localhost
to:127.0.0.1 localhost
You don't have permission to access / on this
server. (/comment/1678#comment-1678)
Hi after configuring when i run http://localhost (http://localhost) i get the
below error .. pls advise
You don't have permission to access / on this server.
Answer
Related Searches:
Free Antivirus
Download
Browser Plug-In
Java Plugin
Free Antivirus
Protection
Drupal Development
Drupal Installation
Prefinished Hardwood
Flooring
Install Java
How To Install Java
Drupal Theme
?
3/3/2014 How to install Apache Server on Windows | ricocheting.com
http://www.ricocheting.com/how-to-install-on-windows/apache 8/9
April 10, 2011 - 7:40pm — DemonDriverDan
April 14, 2011 - 1:33pm — ricocheting (/user/1)
April 30, 2011 - 3:22am — Anonymous
May 1, 2011 - 7:01pm — ricocheting (/user/1)
(/comment/1685#comment-1685)
I would guess you don't have an index file in your DocumentRoot directory
and that Apache is not set to list the files available by default.
Access Denied error in browser
(/comment/1790#comment-1790)
As soon as I move the DocumentRoot from the htdocs location, I get a 403
Access Denied error. I'm running Apache on Windows Server 2008, and it was
working before I tried to sort out password protection using .htaccess etc. I
uninstalled Apache, and deleted all related files I could find but it keeps
coming back with the same error!
Any ideas?
Answer
(/comment/1801#comment-1801)
what happens if you try to directly access a file? eg;
http://localhost/index.html - does that also give a 403? if directly
accessing a file works, then the problem is related to DirectoryIndex not
having the correct "default" files after it that you want apache to look for
when you access a directory (eg; DirectoryIndex index.php index.html) or Options
needs +Indexes added to it if you want apache to list the files if a
DirectoryIndex file isn't found (by default I think it will 403 now instead of
listing the files)
how to run a jsp program???
(/comment/1865#comment-1865)
Thanks for your valuable tips. now will you please tell me the procedure to run
a jsp program on this web server?
Answer (/comment/1871#comment-
1871)
You can install Tomcat for Apache (http://tomcat.apache.org/tomcat-6.0-
3/3/2014 How to install Apache Server on Windows | ricocheting.com
http://www.ricocheting.com/how-to-install-on-windows/apache 9/9
December 27, 2011 - 6:27pm — Anonymous
December 28, 2011 - 7:02pm — ricocheting (/user/1)
December 31, 2011 - 2:00pm — Anonymous
doc/setup.html#Windows). That should allow you to use JSP files although
I personally have never done it.
Do I have to remove IIS?
(/comment/2834#comment-2834)
http://localhost/ (http://localhost/) -> it works
http://127.0.0.1/ (http://127.0.0.1/) -> IIS page
Is this a conflict or is it normal?
thanks
Answer
(/comment/2841#comment-2841)
No, that is not normal and I'm not sure it's even possible (without multiple
IPs mapped). Both apache and IIS run on port 80 by default and whichever
one starts first should "lock" the port 80 and prevent the other program
from serving on it. Are you sure 127.0.0.1 is displaying an IIS message and
not some browser created message? (they do look alike in Internet
Explorer).
Just stop IIS before installation
(/comment/2848#comment-2848)
Stop IIS before installation and everything will work fine..