Mac Server Series: Hosting Multiple Web Sites on a Single Mac

In this Mac Server Series screencast I explain how to host multiple web sites (domains) on a single Mac. In Apache parlance this is called setting up “virtual hosts”. Just as FreeMacBlog.com, FreeMacWare.com, FreeMacUnix.com, etc. all run on a single Mac at Macminicolo.net, with these instructions you can do the same.
Watch it here: How to Host Multiple Web Sites on a Single Mac
Show Notes:
iEntry 10th Anniversary
Rumors
News
October 24th, 2006 at 11:30 am
Glad to see you are back!
October 24th, 2006 at 12:08 pm
http://www.macminicolo.net/videos/ServerVideo6.mov dos not exist
October 24th, 2006 at 12:13 pm
Jesper, it is currently propagating to multiple servers. Until that happens, just refresh the page a few times in your browser and it will come up.
October 25th, 2006 at 12:50 am
Glad to see you back Sir….. You out did yourself on this video.. good job… Hey do you think when you have time to do a video on setting up a file server on the mac?
October 25th, 2006 at 5:58 am
I second Rob for the file server video. Would be glad to see it here.
October 25th, 2006 at 2:22 pm
@Rob and Matthieu, a file server video is a good idea. What sort of file server are you looking for? Turning on FTP or Windows file sharing is a matter of checking the box in System Preferences Sharing, but I assume you must be looking for something more than this.
October 25th, 2006 at 5:12 pm
Good job!Men,just keep going.
October 25th, 2006 at 10:16 pm
‘…it is currently propagating to multiple servers.’
How do you host the video on multiple servers and have one URL for all of them ?
October 26th, 2006 at 7:20 am
RKM,
Yeah i was looking to see how you can setup a (5) users with one logon password, but have them see only the folders they need to see.
So I guess all of the users folders would be in one single dir.
October 26th, 2006 at 7:28 am
Kirk, we use a great service called Pure Static to serve up these videos.
http://www.purestatic.com
October 26th, 2006 at 1:05 pm
rob: I get you now. That sort of server setup sounds like a good topic for a tutorial. I’ll look into it.
October 27th, 2006 at 3:01 am
Just heard about your site from Mac Daily News - thanks much for your time & effort! A practical issue: not being a web ace (understatement - I’m having to learn this stuff from zero), I nevertheless need to build a site. Given the streaming nature of your video, Safari won’t allow zooming in, and the text you type in your video is too small to see on my monitor. Is it possible to simply download your videos so I can play them full screen on one monitor while typing on another? I don’t see a link for downloading… Thanks.
October 27th, 2006 at 4:26 am
This doesn’t work. I did everything just as it is in the video, but it didn’t work as shown. I got a screen that said Forbidden.
What is the missing step?
October 27th, 2006 at 9:16 am
Jim: Thanks for your comment. To download the video, hold the Option key as you click the link. It will begin to download the video. Once downloaded, you can zoom it in Quicktime.
October 27th, 2006 at 9:20 am
Ken, it sounds like you have a permissions issue on one of the files. Assuming you made an index.html file, click on that file and choose Get Information from the file menu. Then under Ownership & Permissions click Details and make sure under Group Access it says “Read Only” and under Others it says “Read Only”. If it doesn’t work, let me know. The same thing may be necessary for the folder that contains index.html.
October 28th, 2006 at 12:21 pm
I have the same permissions problem after following the video. I get the 403 Forbidden error with trying to navigate to the websites I created. The Permissionss for Group Access and Others is “Read Only”. Any assistance would be appreciated.
October 28th, 2006 at 2:30 pm
DLB (and Ken): Could you give more details about your setup? Where is your index.html file located?
October 30th, 2006 at 5:46 am
I followed the video step by step. It is in the root under the www directory. All the permissions are set the way you specified earlier. I have an iMac and a Macbook and I get the same results on both.
Thanks,
DLB
November 5th, 2006 at 10:34 am
hi soory to be a newbee but im buying my first mac its the imac 24″
i would like to set up a web and file server i have just got in to this web site idea do i need to buy a domian name or can i use a free one i dont mind paying if i got one how can i set it up
if some one can help me set this up i will happley pay for help
thanks andy sorry if this sounds too newbee
November 7th, 2006 at 1:25 am
thanks RKM.. I hope you can get a video out about the file server..
rob
December 8th, 2006 at 1:54 pm
Awesome! I have been looking for something like this for a while now! Keep them coming.
Chris
February 18th, 2007 at 3:17 pm
Great video! Just what I was looking for thanks!
February 25th, 2007 at 2:13 am
Congratulations on the video, it is excellent. I do however have a problem with permissions. I cannot alter the hosts file. I am using BBEdit Lite (Smultron is at 10.4, I’m still 10.3) and as soon as I attempt an edit I’m told the file belongs to root. I’m logged in as “Admin”. I have tried to log in as root (setting the root account in NetInfoManager as per the Apple help file) but don’t get the “Other” account in the log in screen. I have the horrible feeling that I’m missing the obvious but am at a loss as to what it is. Do you have any pointers? If it helps I tried first on a local machine (10.3) as well as my remote mini (minimaccolo) each time with the same result - can’t log in as root!
February 26th, 2007 at 10:07 pm
Thanks for all the information.
I was wondering if the security as standard with OSX and apche is enough when hosting from my home imac or would it be wise to alter the configuration of apache in some way to make it more secure, or even get a dedicated mac mini for the job and palce it out side my home network?
I sometimes get strange “Get” requests in the access logs, mostly from china for some reason. Or am I just worrying over nothing?
May 2nd, 2007 at 9:46 pm
What a lifesaver! I’ve been trying for over a week to make virtual hosts work. I tried the Apache instructions and dozens of others. Nothing worked until I watched Richard’s video, and then I had it up and running in ten minutes!!! I shared this with my friends in the Macintosh group over at Flickr (http://www.flickr.com/groups/macintosh/discuss/72157600152195277/#comment72157600171029227).
Now all I have to do is come up with some content for my three sites…
May 5th, 2007 at 6:31 pm
brian, thanks for the nice comment about the video. I’m glad it was helpful.
July 8th, 2007 at 3:56 am
amazing video got the localhost mysite myothersite and mythirdsite up in no time
But in the real world, I have 2 domains AND I AM pointing both of them to my ip address, then changed httpd.conf file settings, but nothing happened, Please tell me in the real world is there something else to be done ?
Thankz
August 10th, 2007 at 8:52 am
This is a simple question, but if I don’t want to register multiple domain names, is there still a way to host multiple sites on my mac mini?
September 21st, 2007 at 5:02 am
[...] already showed you how to host multiple web sites on one Mac, but that tutorial assumes you want them all to have the same ip address. Sometimes, you’ll [...]
September 6th, 2008 at 6:20 pm
Hi there i would like some help on setting up my server
the question i have is :
i bought a domain Name http://www.******.com (example)
and i wan t to host my own server at home and have a dynamic ip
how do i do to get this done
Thank you
September 20th, 2008 at 8:17 pm
Hi webmaster!
September 20th, 2008 at 8:27 pm
Hi webmaster!
September 30th, 2008 at 12:27 am
LOL
that doesn’t even make any sense!
October 9th, 2008 at 12:25 am
Hi webmaster!
November 16th, 2008 at 9:58 am
Hey all
firstly great video, i have been looking into how to do this for a long time and this is perfect.
Right so i have problem, i’m using Mac OS X Server 10.5.5 and have opened up the httpd.conf file but cannot find the text NameVirtualHost anywhere, is it different on this operating system ??
Many Thanks
December 7th, 2008 at 10:14 am
Hey Yall,
I am having the same problem with the forbidden page…
“Forbidden
You don’t have permission to access / on this server.”
I have set permissions to Read/Write in all my folders containing the site page info.
Thanks in Advance.
March 4th, 2009 at 6:20 pm
The video explanation is well done - very clear and easy to follow.
Unfortunately the versions of Apache are probably not matched with my Leopard 10.5.6. For example, there is no HTTPD folder - my system shows Apache2 as being the server version.
In the config file there is no NameVirtualHost section as shown in the video. In the video that section is at about line 1048. On my version of Apache’s config file, the only line for VirtualHost is at line 428 or thereabouts.
I assume that the concepts of the settings are the same - but for some odd reason the setup doesn’t work (I’m using Firefox but that shouldn’t matter).
April 12th, 2009 at 6:26 am
I would like to host two different domain names using mobile me as the host and creating the site with iweb. I already have one site up and running, but I am having trouble with the second. I bought both domain names from http://www.mydomian.com, and it seems like everyone gives instructions based on http://www.godaddy.com and they are just not set up the same. Is there anyone out there that can help me?!?!?
April 15th, 2009 at 7:00 am
If you ever want to hear a reader’s feedback
, I rate this post for four from five. Detailed info, but I have to go to that damn yahoo to find the missed bits. Thanks, anyway!
September 7th, 2009 at 2:03 am
I really liked the video but I now have OSX 10.6 and my httpd.conf file ends before NameVirtualHost. It is about half as long. I have found a solution at clickontyler.com.
Do you think you would like to revisit this topic?
October 9th, 2009 at 11:59 pm
http://casinodip.com/images/VisitSwiss.gifhttp://casinodip.com/images/VisitKing.gifhttp://casinodip.com/images/VisitEnter.gifhttp://casinodip.com/images/VisitClub.gifhttp://casinodip.com/images/VisitLas.gifhttp://casinodip.com/images/VisitMagic.gif
Attn: Las Vegas Dreamers… http://casinodip.com/smile.gif
The only real solid investment you have is cash that is in your hands. Today, the dollar has lost its value, the real estate & stock market is dead, and jobs are scarce…
Better to make instant cash online as opposed to sit and watch your savings, assets and job just disappear over time.
When is the last time you usedHave you ever made money using Casino Gambling & Casino Gambling ?
Largest Casino Gaming Website
http://www.casino.com/images/bottomlogos.gif
http://casinodip.com/images/VisitSwiss.gifhttp://casinodip.com/images/VisitKing.gifhttp://casinodip.com/images/VisitEnter.gifhttp://casinodip.com/images/VisitClub.gifhttp://casinodip.com/images/VisitLas.gifhttp://casinodip.com/images/VisitMagic.gif
October 16th, 2009 at 4:20 am
I am getting a new iPhone and wanted to know what the best case is to protect it. I am clumsy. I tend to drop things and want to make sure I get the best case/protective screen. Thanks!
________________
[url=http://www.youtube.com/watch?v=EDL0UUeyM8c]unlock iphone 3g[/url]
October 21st, 2009 at 4:51 am
I pluged up my iphone to my computer and tried to sync my info from my phone to the computer….but I lost my contacts. They are not on the iphone anymore. How can I find them and how do i get them back on my phone.
________________
[url=http://unlockiphone3g.webs.com]buy unlock iphone[/url]
November 22nd, 2009 at 9:35 pm
I’m planning to buy an iPhone. But before i do that i need to find out if the [url=http://unlockiphone22.com/]www.unlockiphone22.com[/url] can view every website just like the one on the computer. Does Safari support all websites including JAVA and flash players. Can i view Youtube and pics and other videos on the Iphone using the interent website? One last thing how long does it take for a page to load?
November 24th, 2009 at 12:36 am
Hello, I have the iPhone 2G (1st Generation) and I wan to sell it tomorrow. I will be travelling to Canada soon and will ge the new [url=http://unlockiphone22.com/]www.unlockiphone22.com[/url] later on. How can I save my contact list from the iPhone to my computer, and then copy that information to another computer since I’m not taking this computer with me? I am using Windows OS. Best regards, Woody :.