Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

supernovastar

macrumors newbie
Original poster
Oct 8, 2007
16
0
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.
 

wrldwzrd89

macrumors G5
Jun 6, 2003
12,110
77
Solon, OH
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.
 

ChrisA

macrumors G5
Jan 5, 2006
12,584
1,701
Redondo Beach, California
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.

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
 

supernovastar

macrumors newbie
Original poster
Oct 8, 2007
16
0
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?
 

plinden

macrumors 601
Apr 8, 2004
4,029
142
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/
 

madog

macrumors 65816
Nov 25, 2004
1,273
1
Korova Milkbar
I managed to get everything working and get my site hosted on my iMac and whenever I test it it works fine ( I've tested it in Safari Opera Firefox IE & my iPhone).

But for some reason it doesn't work on other computers, any ideas why?

Heres the link http://www.martynmphotography.com

By the way, the site is far from finished!!

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....
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.