Using my Intel iMac as a web server

Discussion in 'Mac OS X Server, Xserve, and Networking' started by supernovastar, Dec 15, 2008.

  1. supernovastar macrumors newbie

    Joined:
    Oct 8, 2007
    #1
    Hey,

    I've just found out that I can use my iMac as a web server to host my web site.

    I did a quick google search on how to do this and was following this tutorial - http://www.macinstruct.com/node/112.

    I've done everything it said and went into Library>Web Server>Documents and replaced everything in that folder with my web pages. Only thing is, when I type localhost into Safari it doesn't show my web site, it still shows the Apache page.

    Any idea why this is happening? I've made all the necessary changes in System Preferences, yet still no joy.

    Any advice will be appreciated.
     
  2. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #2
    Have you changed the configuration for Apache at all? If you haven't, the most likely cause of this is Safari not letting go of the cached Apache page. Refreshing usually cures this.
     
  3. dampfdruck macrumors member

    Joined:
    Oct 20, 2008
    #3
    Make sure the file-name of your main page is called "index.html".
     
  4. ChrisA macrumors G4

    Joined:
    Jan 5, 2006
    Location:
    Redondo Beach, California
    #4
    Everything? Sounds like the Apache sample page is still there. You need to replace it. Either that or the page is cached in Safari

    Yes the iMac words as a srver but a very expensive one. Much better to get any old PC you might hav and install BSD Unix or Linux and Apache. PCs are free, you can always find some one who is trying to give one away
     
  5. supernovastar thread starter macrumors newbie

    Joined:
    Oct 8, 2007
    #5
    Got it! The apache page was still cached in safari. Thanks for the help.

    Why do you say using the mac as a server is expensive?

    Also, is it possible to host multible sites?
     
  6. plinden macrumors 68040

    plinden

    Joined:
    Apr 8, 2004
    #6
    As a dedicated web server, it's expensive since you'd be using and expensive computer it for nothing else. But if you're just using it to server some pages to friends or family, it'll be ok.

    But, if you have any sort of traffic on it, you're ISP is going to be pissed with you.

    As for multiple sites, read up on virtual hosts - http://httpd.apache.org/docs/2.2/vhosts/
     
  7. supernovastar thread starter macrumors newbie

    Joined:
    Oct 8, 2007
  8. madog macrumors 65816

    madog

    Joined:
    Nov 25, 2004
    Location:
    Korova Milkbar
    #8
    This is when you get into port forwarding and whther or not your ISP even allows personal site hosting (in which they block incoming requests for port 80, or something like that). If you have a router than you might need to open up ports 80 and 8080 (depending on which), but it's been a while since I did this so I'm not %100.

    Also, I didn't check out the instructions you looked at, but do you have an update client? Do you need one? To continually map your hostname to your IP address (even if it changes), you may need an update client.

    You can tell I'm shooting from the hip on this one....
     

Share This Page