Mac360 Easy Search
Enter your search keywords below »

Mac360 Power Search
Click below for advanced search options »
Mac360 Archives
By Month, All, Category

Latest Mac Reviews Mac360 Forums New Encore Reviews
Home  »  What's New  »

Get A Virtual Web Host On Your Mac That Just Works.

VirtualHostYes, your Mac can be a web site server. It’s easy. What if you just want to fake it?

Make your Mac a web server without the domain name? Can do. VirtualHostX is the niftiest one trick pony of the summer-- it just works.

The Mac360 guys are all into setting up a Mac as a web server. Ron even has his own daily blog set up on a Mac mini on his desk. What if you don’t want to go to all that trouble but still want your Mac to host a faked domain name?

That’s called virtual hosting. Your Mac becomes a server for a web site but only on your Mac; nowhere else. Web site developers love virtual hosting because it makes it easier to develop sites, add links, and so on.

You can do virtual hosting on your Mac a couple of different ways. One is complicated, requires a restart, and use of OS X’s terminal. It’s also free. The other is almost free and is purely point and click.

Guess which one I chose?

Here’s the problem. Ron asked me to help out on a couple of web sites he’s developing. My part requires that my Mac be a virtual host. In this case, I’ll use the domain name “katesdomain.com.”

To get katesdomain.com to show up in Safari or Firefox, which makes developing pages and links much easier, I have to set my Mac up as a virtual domain. That means typing katesdomain.com in the browser brings up the pages I’m developing, since the real site doesn’t exist yet.

It’s so easy a caveman could do it. Not. Do you honestly want to do this? Open terminal, navigate to the /etc directory, and edit the hosts file? This is what it looks like:

# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1 localhost
127.0.0.1 katesdomain.com
255.255.255.255 broadcasthost
::1 localhost

Edit it properly, and your Mac becomes a virtual host for katesdomain.com (or whatever name you choose). Then restart your Mac for the changes to take effect.

Not wanting to dink around in terminal any more than necessary, I asked Ron if there was an easier way. He said yes. It’s drop dead easy. Use a nifty application called VirtualHostX by Tyler Hall.

What VirtualHostX does is, indeed, drop dead easy. Tyler has an elegant instructional video of the steps. It’s about three clicks to make it work and you don’t have to restart your Mac.

Getting started is easy, too. Download VIrtualHostX, open and drag to your Applications folder, then double click to launch. The welcome screen gives you three steps. Create a backup of your Apache server configuration files. That’s one click. Turn on OS X’s virtual hosting and adjust the settings. That’s two clicks.

Tyler says there’s no third click. But there is. You have to close the Welcome window.

Now it’s time to create a virtual domain (remember, “virtual” means that the domain name only works on your Mac, in your browser). Click the Plus + button, type in the host name (domain name) you want to use. Then select the document root. That just means to select the folder on your Mac where the web site’s files will be.

Click Save Changes. Done. Now, open Safari or Firefox or whatever, and enter http://mydomainname.com (or, whatever domain you entered in VirtualHostX). If you created a few web pages and put them in a folder that VirtualHostX can find, that’s what you’ll see in your browser.

How cool is that? Very cool, considering VirtualHostX is a measly $7.00. Add as many virtual hosts (domain names) as you want, then develop web sites until your face is blue or the cows come home.

Why do this? Let’s say you want to make your own web site with your own domain using RapidWeaver, Dreamweaver, or Apple’s iWeb (but not use a .Mac account). Creating the site is easy these days, but viewing your results and checking your links before uploading the site to a server is more problematic.

Now it’s not. Whatever links you have will point accurately to your virtual host, the domain name you entered in VirtualHostX.

Can you do this for free? Yes. Just like you can build web pages and a web site for free using any of the free HTML editors. It’s slower, laborious, painful to learn. Ditto for setting up your Mac to host your virtual domain as a virtual host. Using VirtualHostX is a bargain.

Check out the daily list of our 9 Word mini-Reviews at NoodleMac, and Kate's daily in-depth Mac software reviews at PixoBebo.

   • Article by Kate MacKenzie • Published on Thursday, August 30, 2007
   • Category: What's New • 4 Reader comment(s) • Email This • Digg This • Shop Now
  Page 1 of 1 Page(s) for this article.

Talk Back to Kate, Ron & the Mac360 staff
Mac360 readers talk back. View their comments below or post your own comment to this article. Comments are moderated by the Mac360 staff. Or, post comments in the Mac360 Forums. It's mostly anonymous, there's no obligation, and no cost, so join in-- it's free, fun, low in calories, low in carbs, non-fat, and mildly addictive-- like chocolate and blondes.

Readers Talk Back:
Tyler Hall says:

Zap, send me an email at I’m sure there are other people out there using MAMP and having the same problem. If we can get it worked out I’ll send you a free license.

   — Posted on Fri Aug 31 at 3:12 pm by Tyler Hall

ZapPow says:

I don’t think it’s non-standard, unless MAMP has a non-standard version.

When I try it on a folder with an index.php or index.shtml file, it just displays a white page, telling me I don’t have access to this folder !

   — Posted on Fri Aug 31 at 2:59 pm by ZapPow

Tyler Hall says:

Thanks for the great review, Kate grin VirtualHostX is still very new, so any suggestions or comments are greatly appreciated.

The next update will change the “Host Name” and “Document Root” labels to something more user-friendly. (Got that idea from your comments above.)

@ZapPow: My PHP files are working fine with this app. Are you using some non-standard PHP install on your Mac?

   — Posted on Thu Aug 30 at 4:17 pm by Tyler Hall

ZapPow says:

Fine little app indeed. I loved it, though I have, unfortunately, no use for it : I develop sites with PHP and SSI, and it doesn’t know those things. It knows only HTML (didn’t try with HTM).

Maybe, instead of replacing your server’s configuration files it could just append some lines for the virtulization… Well, it’s obviously for people who won’t tweak those files…

   — Posted on Thu Aug 30 at 3:00 pm by ZapPow

  Page 1 of 1 Page(s) for Comments on this article.
     Back To Top

Talk Back to Mac360 and post your own comment

Your comment may be anonymous if you want (it's OK to use a cute name, or something everyone can remember). An email address is only required if you want to be notified of new comments by other posters, and is always shielded from email spam harvesters.

We moderate the comments, so keep it on topic, relevant, worthy, and funny. Or, pick any two. Yes, SPAM links will be deleted, so don't even think about it.

Talk back and enter your comment below:
Your Name:
Your Email:(optional: needed only for comment notification)
Your Location:(optional: your city, state, country)

Enter Your Comment Below:
Remember my personal information?
Notify me of follow-up comments by email?

Please enter the Mac360 "Magic Word" from the image below:



     Back To Top
What's in the FORUMS?
Newest Daily Topics


Also in Mac360
Recent Articles