setting up apache web server on xp

having luckily acquired a laptop recently, i’m having great fun installing lots of stuff 😉 remembering the first time i set up a web server on my pc still makes me shiver but i’m not sure why since it’s really straightforward! if you’re involved in any sort of server side scripting, it’s definitely worth while as it beats uploading every time you want to test something!

if you want to work with asp/.net, you would need to use microsoft’s iis. unfortunately, windows xp home edition does not support iis so i won’t be giving that a go!

however for everything else (php, perl,python etc) a much better choice is apache. you can download this from http://httpd.apache.org/download.cgi. this page will tell you what the latest stable version is (2.0.49 at the time of writing). if you just want to use apache rather than mess about with the source code, choose the win32 binary (msi installer) download option.

running this package starts the installation wizard which mainly involves clicking next as usual! when you get to the server information screen illustrated below, enter localhost as the network domain and server name and fill in anything you like for the e-mail address. Stick with the default option of installing it for all users on port 80 as a service:

fill in localhost on the server information screen during the apache installation wizard


click next on the rest of the screens and complete the installation.

apache should start automatically. to test everything is working, type http://localhost into a browser window and you should see the apache test page:

you should see the apache test page if you have successfully installed apache


apache should automatically start each time on start up. if you want to restart the server after problems / configuration changes, you can easily do this via the apache monitor accessed from the start menu or by double clicking on the apache icon in the bottom right of your screen.

to actually start seeing your web pages instead of the test page, put your files in the c:\program files\apache group\apache2\htdocs directory. this is equivalent to the public_html folder e.g. if you save a webpage to htdocs\news\article1.html then you can view it by going to http://localhost/news/article1.html.

12 thoughts on “setting up apache web server on xp”

  1. You have been more help to me than anybody I have found so far:)
    I have downloaded and installed Apache web server and the software is functional.
    Please show me how to make my web sites available to internet users? I have stored all data ready on the http://www.drive. You can view the pages on the web. My domain name is registered and active.
    I am with you up to the final point, I cannot fathom which file to edit to make my web page connections via the “www.mitchell-uk.net” link.
    Obviously you know they way to do this. Please kindly divulge this info.
    I love your site and pages. I hope you enjoy mine too. You are also the smartest young lady I have ever located, anywhere, ever!
    Yours sincerely
    John
    p.s. I find the instructions apache give are totally confusing, I am slightly dislexic (probably spelt that wrong too) Haha

  2. hi john,

    thanks for the kind words.

    from what i gather, you are trying to host your domain on your own PC.

    this post was just intended for those who wanted to set up a server on their PC for local testing. setting up a full scale web server from which to host a domain from involves a bit more.

    i’ve never done this myself – i’d rather pay a modest sum to let the experts take care of the hassles for me 🙂 but i believe it’s easily possible and here are a couple of tutorial sites which should help you along:

    http://www.diywebserver.com/
    http://www.dslwebserver.com/

  3. Hello!

    Your page was a Godsend through google today at 5 a.m. when I read up and was so encouraged to do it TODAY that I was finished setting up localhost by 5:30 a.m. !! Too slow?!!? I’ve waited almost 7-8 years for this, therefore started slow, but needed a nudge from your web-page to do this today!

    Ofcourse, moving locahost to something else is a different story and am sure that’ll not take 7 years!

    I just wish to thank you very much for the encouraging “howto” doc here.

    SkyClipper.

  4. This is like the video guide I saw once but, this is a lot more simple 😀

    Must learn how to put shopping carts into pages etc, this is the first
    thing I needed to do, get Apache going.

  5. The simplest and greatest tutorial I have read, got it up and running in minutes.

    Thanks for the great info =D

  6. hi yhanks for your advise keep it up

    am having problems with the configurations though each time i try to restart as instructed i get an error message “syntax error or the document root must be a directory ” could i get help on how i could go arround this

    Am interested the web server to view my cctv system through the internet how i could i set it up thanks

  7. I got so tired of trying to set up apache and php and mysql on my machine I just gave up and got a hosted site. I’m finding out NOW, I really do need this local so can test it BEFORE i have to upload to see if it works.

    I’ve got apache set up now, but when I type in local host it comes up with a webpage that has Index and all my files indexed in there. can you tell me what I’ve messed up in my conf file to do this.

    Thank so very much

    Doug Gentry
    PS, Very cool page ya have here!

Comments are closed.