iEntry 10th Anniversary Rumors News

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


Image
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:


45 Responses to “Mac Server Series: Hosting Multiple Web Sites on a Single Mac”

  1. Joe Says:

    Glad to see you are back!

  2. Jesper Says:

    http://www.macminicolo.net/videos/ServerVideo6.mov dos not exist

  3. Brian Says:

    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.

  4. rob Says:

    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?

  5. Matthieu Says:

    I second Rob for the file server video. Would be glad to see it here.

  6. RKM Says:

    @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.

  7. aquaibm Says:

    Good job!Men,just keep going.

  8. Kirk Says:

    ‘…it is currently propagating to multiple servers.’

    How do you host the video on multiple servers and have one URL for all of them ?

  9. rob Says:

    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.

  10. Brian Says:

    Kirk, we use a great service called Pure Static to serve up these videos.

    http://www.purestatic.com

  11. RKM Says:

    rob: I get you now. That sort of server setup sounds like a good topic for a tutorial. I’ll look into it.

  12. Jim Says:

    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.

  13. Ken Says:

    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?

  14. RKM Says:

    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.

  15. RKM Says:

    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.

  16. DLB Says:

    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.

  17. Administrator Says:

    DLB (and Ken): Could you give more details about your setup? Where is your index.html file located?

  18. DLB Says:

    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

  19. andy Says:

    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

  20. rob Says:

    thanks RKM.. I hope you can get a video out about the file server..

    rob

  21. Chris Says:

    Awesome! I have been looking for something like this for a while now! Keep them coming.

    Chris

  22. Alojamento Says:

    Great video! Just what I was looking for thanks!

  23. Dave Says:

    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!

  24. Mal Says:

    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?

  25. brian Says:

    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…

  26. Richard Says:

    brian, thanks for the nice comment about the video. I’m glad it was helpful.

  27. Hitesh Says:

    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

  28. Mark Says:

    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?

  29. Mac Server Series: Configure Two IP Addresses On One Mac -- ministats.com Says:

    [...] 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 [...]

  30. federico Says:

    Hi there i would like some help on setting up my server
    the question i have is :
    i bought a domain Name 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

  31. Kazelfog Says:

    Hi webmaster!

  32. Kazelxiq Says:

    Hi webmaster!

  33. Andrew Says:

    LOL
    that doesn’t even make any sense!

  34. buy nolvadex Says:

    Hi webmaster!

  35. Horatio Says:

    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

  36. Nathan Says:

    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.

  37. David Says:

    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).

  38. Beth Says:

    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?!?!?

  39. How to Get Six Pack Fast Says:

    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!

  40. Jamie L Says:

    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?

  41. ionimbsmods Says:

    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

  42. Pneurry Says:

    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]

  43. Pneurry Says:

    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]

  44. Pneurry Says:

    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?

  45. Pneurry Says:

    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 :.

Leave a Reply