Apache
  Home arrow Apache arrow Page 3 - Installing and Configuring Apache 2 on...
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Moblin 
JMSL Numerical Library 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
APACHE

Installing and Configuring Apache 2 on a Windows XP Machine
By: Dan Wellman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 128
    2005-09-28

    Table of Contents:
  • Installing and Configuring Apache 2 on a Windows XP Machine
  • Getting Started
  • Configuring
  • Getting PHP Working
  • Configuring MySql

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Installing and Configuring Apache 2 on a Windows XP Machine - Configuring


    (Page 3 of 5 )

    To make creating a test website easier, you should reconfigure the DocumentRoot to a more accessible folder than the default of C:/Program Files/Apache Group/Apache2/htdocs.  Create a folder on your C drive and call it mysite or something similar.  Within this folder, you can create a sub-folder called documents or something similar.  Web site roots are normally set up so the the HTML files are kept in one folder, the JavaScript files in another, and so on. Stick an HTML file in the folder, just something basic that renders a sentence in the browser.

    Now go to the Start menu and select Edit the Apache httpd.conf Configuration File from the Apache program group.  This will open the main configuration file used by Apache.  You’ll need to scroll down to section two and find a directive called DocumentRoot.  Change the value to C:/folderyoujustcreated.  A little bit further down, you’ll see a <directory “C:/Program Files/Apache Group/Apache2/htdocs”> directive which will also need to be changed to whatever the DocumentRoot was set to. 

     

    Now save the file, restart the server and open a browser window.  Type http://localhost in the address bar again and the HTML file you just created should be displayed.  If instead, you see a directory style listing with Index of / at the top of the page, it means that you saved the HTML file with a HTM extension.  To correct this, open the httpd.conf file again and scroll down past the changes you just made to the DirectoryIndex directive.  Add index.htm to the end of the line and again save the file and restart the server.  Refresh the page and you will see the proper document.

    More Apache Articles
    More By Dan Wellman


       · Personally I just use Xampp. It's a lot easier to get up and running with a full...
       · The XAMPP or XAMPPLite packes look very good and hassle free, but if you are looking...
       · Thanks for the article in the step-by-step, easy to read and understand fashion....
       · Hi all,When I uncomment ;extension=php_msql.dll this line and put the...
       · You had uncommented the ;extension=php_msql.dllnot...
       · Hi Dan,I received the following error message:PHP Startup: Unable to load...
       · Hi,I far as I know, there should not be a C:\php\ext folder, the libmysql.dll...
       · I'm glad the article has helped, happy coding!Dan
       · Hi, Did the above help, or do you still have issues with mySql?
       · I got the same error:PHP Startup: Unable to load dynamic library...
       · I followed the instruction, but all I get was"<html></html>"It's not...
       · I followed the tutorial exactly, and it worked great under firefox. I then tried it...
       · Hi all, I have the same error. I tried extracting the php_mysql.dll file but it...
       · ok people, I'm surprised that so many people are haviving similar issues when...
       · I have completely uninstalled Apache2, PHP5 and Mysql. Then deleted all the folders...
       · Hi, sorry you're still having problems...I replicated your error exactly by...
       · Also, do a quick search for php_mysql.dll This should be in your...
       · hey, ive got a slight problem with mysql.first off in the mysql instructions,...
       · Hi Dan thanks for replying. The php_mysql.php wasn't in the system32 folder. It is...
       · *update*found i was editing C:\PHP\BACKUP\php.ini instead of...
       · Put the php_mysql.dll file in to your windows/system32 folder. That stopped that...
       · sorry, im very tired from battling with my stupid internet connection all day,...
       · Thanks for the updates Trev, your version of the code will work fine, although it is...
       · sorry Trev replied to the comments in the wrong order..!
       · Don't worry about your post being so long - all good advice! Appreciate the...
       · Hi everybody, the solution now appears to be contained fully within this blog, I'm...
       · thanks Danmy comments about the code were actually aimed at Trevor and not you,...
       · Yeah, just copy the "php_mysql.dll" file from the [b]PHP zip package[/b] (not EXE...
       · Hi,Ha ha, not to worry in that case :sheepish:With regard to altering the...
       · This might sound stupid, but what is the solution to fixing these error message....
       · Thank you for your advise. I have my trusty PHP book (Beginners) and of course the...
       · Hi,Provided the mysql.php code is *exactly* as shown in the eample it should...
       · I checked and sql.safe_mode is Off and i copied exact code for the guide, but still...
       · when you installed mysql, did you set a password? The default installation should...
       · i've followed this tutorial and everything works apart from the mysql..i've...
       · Hi,It seems that you have SQL safe mode set to ON in PHP.INI. Scroll throught...
       · yeh that solved the sql safe mode error but its still showing the other error... any...
       · Hmmmmm, the error doesn't give much info does it, although from your code, it looks...
       · sorry about the smilies, they are all ')' characters
       · Concerning port 80 - Skype usually uses it, so be careful. My Apache2 installation...
       · Thanks for sharing this, I had the same problem regarding Skype and meant to put...
       · Please forgive my "newbieness", but I have run into a problem. Obviously I am...
       · You haven't got IIS running have you?
       · I am having the same problem as the user above ("The page cannot be displayed"). I...
       · Was skype installed and running when you did this? If so, switch it off whilst you...
       · No, I do not have Skype installed now nor when I was installing Apache2.
       · Well, I have to admit, I don't know why you arn't seeing the Apache start page. ...
       · Enjoyed working on this problem but I recieve the same error. "Fatal error: Call...
       · It is possible (but unlikely) that it's an issue with XP home rather than XP...
       · I finish the 3 step but i can't see my htm file.The browser (Firefox) says "Năo...
       · Have you tried saving the file with the full .html extension?
       · yes, but it keep showing the same message.Can you tell me what restart the server...
       · Rebooting the server means basically stopping the web server process then starting...
       · I reinstall Apache and i was able to see welcome to Apache page.Then i change the...
       · Hi,Could you paste your entire httpd.conf file into an email and send it to me?...
       · Hi Dan,I too am stuck on seeing the directory style listing "index of/" i.e "my...
       · Hi Dan,This time I have logged in as username: scottalapI have gotten stuck...
       · Hi guys,The DirectoryIndex directive should already be present in your...
       · Hi, thanks for a website like this am very happy to have followed your work and am ...
       · Hi,I'm glad you were able to follow the article and install everything ok,...
       · Hello Dan. I can't seem to get Apache 2.0, and Php 5.1.4 configured in Windows XP...
       · Hi Dan, great work!I Installed Apache 2.2.2 and it worked well. however php 5.1.4...
       · Hi,I'm really sorry I didn't post back sooner but I've been on holiday and moved...
       · Here you go, a copy of my working http.conf file:## Based upon the NCSA server...
       · Thanks heaps... That httpd.conf file has much more stuff than mine, to avoid...
       · Thank you soooo much, got php5 right finaly mostly due to your httpd.conf document,...
       · Dude, I am glad its working for you now, happy coding!
       · Hi, So far everything went smoothly with Apache (I had to close Skype though). I...
       · I fixed the 403 problem by downgrading Apache to the 2.0.x version. It is working...
       · Hi Asaf, i got this from the tutorial earlier, i too overlooked it accidentally and...
       · Hi Stephen,Thanks for the answer. I actually have added the index.php to the file,...
       · First of all, thank Dan for the How-To.2nd, thank to the person above.I have...
       · Hi,index.htm is a throwback from when file extensions had to be three...
       · Great tutorial, Dan. All seems to work well until page 4, the website came up fine...
       · Hi, it may be a difference in the setup but if everything looked like it did in the...
       · Solved the PHP issue by reverting to an earlier revision as suggested above. SQL...
       · The message states that a password is being used in the referenced file, did you...
       · Thanks Dan. I had copied and pasted the file - and yes, there was an imbedded...
       · Hi Larry, glad that got it going for you. The Apache site says that it does not...
       · I have been working on getting my Apache server working and could never get .php...
       · Hi Dan.....Please help !!Wonderful article...makes things look awfully simple....
       · hi Dan i am working with apache ver 2 ? how do i set it up so users can log in to my...
       · hi Dan i got Apache working just fine. how Do i set it up so users from the out side...
       · Hi,You can set Apache up to listen to requests from your IP, however, you need a...
       · i have got static ip adds i have 5 and i plan seting apache on windows server...
       · Hi DanI have tried mutiple versions of apache on Windows. IIS works if i install...
       · Hmmmm, tough call. Got any chat software running like skype or aim?Dan
       · This was a great article. I downloaded Apache onto my WindowsXP computer. The...
       · what does it say? 'Page not displayed' or anything else?Dan Wellman
       · This is the message from IE7:Internet Explorer cannot display the webpage ...
       · hmmm, just tried IE7 on my config (pretty similar to that advised in the article)...
       · Thanks....and how would I do that?
       · Ok, look in the folder where that you have set to be the document root for Apache,...
       · I too am using Apache2.2 and PHP5 and have had no success with the index.php as...
       · I don't see my previous reply yet, but will assume that when reviewed they will come...
       · In reading through a lot of these comments, I am beginning to wonder if...
       · Okay, I think I'm getting the hang of this thing. Maybe they should change the...
       · Okay, I think I'm getting the hang of this thing. Maybe they should change the...
       · Help! I'm going gray rapidly!!!I've installed Apache 2 on Windows XP...
       · HI, I gone through your forum for the problem while running Apache on your local...
       · i had the same problem (copy/pasted straight from the tutorial), but then i noticed...
       · Hi I got an error message after installing the apache server on my window xp media...
       · sounds like you have som other app using port 80, usually its an IM prog....
       · Could you or anyone else please elaborate as to why using apache on Windows is less...
       · windows is buggier and has more security holes in it. I can't tell you which bugs...
     

       

    APACHE ARTICLES

    - Creating a VAMP (Vista, Apache, MySQL, PHP) ...
    - Putting Apache in Jail
    - Containing Intrusions in Apache
    - Server Limits for Apache Security
    - Setting Permissions in Apache
    - Installing Apache
    - Apache Installation and Configuration
    - Apache Tapestry and Custom Components: DateI...
    - Tapestry and AJAX: Autocompleter and InlineE...
    - PropertySelection and IPropertySelectionMode...
    - The DatePicker and Shell Components of Apach...
    - Apache Tapestry: ASO and More Components
    - Apache Tapestry and DirectLink, IoC and DI
    - Making a CelebrityCollector with Apache Tape...
    - Apache Tapestry and Listener Methods, Condit...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway