Mac OS X Localhost Subdomains with Apache’s Virtual Hosts and NetInfo Manager

February 5th, 2007

This is how to create subdomains for testing purposes on localhost. I found a few articles on how do this on Windows (using host files), but nothing for mac. Say for instance you wanted to change your user’s site root to http://username.localhost instead of http://localhost/~username

  • Backup /private/etc/httpd/httpd.conf in case something goes wrong. Just duplicate it with a date-stamp or other memorable name.
  • Open /private/etc/httpd/httpd.conf with your favorite text editor.
  • Try seraching for NameVirtualHost, you should find it around line number 1063. You’ll want to uncomment that line.
    NameVirtualHost *:80
  • There are a few instructions on the following lines. You’ll need something like this in following those instructions.
    <VirtualHost *:80>
        ServerName localhost
        DocumentRoot /Library/WebServer/Documents
    <VirtualHost *:80>
        ServerName username.localhost
        DocumentRoot /Users/username/Sites

Now you’ll have to edit your configuration in NetInfo Manager so the computer knows where to find your subdomain.

NetInfo Manager Screenshot with username.localhost Subdomain

  • Open NetInfo Manager: Applications > Utilities > NetInfo Manager.
  • Click the lock in the lower left corner, you’ll be prompted for an Administrator password.
  • Click on / and then machines. You should see something there named localhost.
  • Click on localhost, then the duplicate icon on the upper left.
  • You should then have something called localhost copy. Go ahead and click on localhost copy.
  • Double click the name field and give it the name of your subdomain in the Apache config file, i.e. username.localhost. Leave everything else as the default.
  • Go ahead and save your changes.
  • You should be able to browse to your sub-domain and see your personal website.

Screenshot of Ownership and Permissions

If you get a 403 Forbidden error, you probably need to set the permissions on your sites directory so the world has read access. Get Info on your sites directory, open Ownership and Permissions at the bottom, Others should be Read Only, Apply to enclosed items… and you should be good to go.

Mac OS X Apache and PHP

February 5th, 2007

There are programs around that make turning on Apache/PHP/MySQL very easy. But what if you want to use Mac OS X’s built in Personal Web Sharing.

  • Backup /private/etc/httpd/httpd.conf in case something goes wrong. Just duplicate it with a date-stamp or other memorable name.
  • Open /private/etc/httpd/httpd.conf with your favorite text editor.
  • Around line 240, uncomment the line that loads PHP module: LoadModule php4_module
  • Around 284, uncomment the link that adds the PHP module: AddModule mod_php4.c
  • Restart Apache by restarting System Preferences > Sharing > Services Tab > Personal Web Sharing.
  • Try a test document with phpinfo(). My version of Tiger had PHP Version 4.4.4 and the Configuration File (php.ini) Path at /etc.

phpinfo() running on localhost

Free TV

July 12th, 2006

RewardsVenue just sent a check for $1800. Just enough for a new HDTV.

Check from RewardsVenue for a new HDTV

WoW mom WoW

December 6th, 2005

So… I hope this explains itself for all those WoW-ies.

WoW Flying Plant

it was almost too far away to pick

Literally LOL Quotes

June 14th, 2005

But probably only to me or maybe other diehard Harry Potter fans. I’ve been reading Harry Potter and the Order of the Phoenix because I’m bored:

They may not look dangerous, but if angered they will gouge out human eyes with their fingers, which as you can see, are very sharp and not at all desirable near the eyeballs (p 259).

Hagrid, who had never heard Umbridge’s fake cough beofre, was gazing in some concern at the closest thestral [magical flying reptilian horse], evidently under the impression that it had made the sound (p 446).

Test for Art (New Title)

April 17th, 2005

This is just a test to see if I can update posts without duplication on my art site.

This is now the edited version, so this post is different than the first.

Failed Maid of Honor Toast

March 6th, 2005

As you may know my sister’s wedding was this past Saturday. As the maid of honor, I was to give a toast. So here it is, and if you knew Isaac’s family you’d know why it was rejected:

I was worried about standing up here giving this toast, so I did some research to help start the creative juices flowing. However, the research wasn’t very helpful. All I learned was to never say that I slept with the bride. And, so, I haven’t.

The Unofficial Guide

November 5th, 2004

Legitimate quotes from The Unofficial Guide to Mexico’s Best Beach Resorts:

But the language is certainly different–a mix of Spanish and English called Spanglish….

Drinking too much cheap tequila (a common pitfall) will also make you wish the Angel of Death would pay a merciful visit.


October 21st, 2004

Top story tonight on KTLA’s 10 o’clock news:

Fidel Castro Trips

Thunderbird Theme

October 18th, 2004

Ok I need to share this with the world… I created my first thunderbird theme, except it’s not my theme because I just updated the theme I always used for TB 0.8. So I’m not claiming that any of this art is mine, or even any of the css, I just combined one old theme and a new theme to make a new old theme. Anyway, here’s a screenshot:

iCandy Jr thunderbird theme screenshot


July 14th, 2004

Just went to Vegas this past weekend, in honor of being 21 and able to enjoy all that Vegas has to offer. The last time, and the first time, I went was for the Vegas Bowl freshman year.

My first trip to Las Vegas, for the Vegas Bowl, Christmas 2001.

As you can see it wasn’t all fun and games, I had to work for my room and board. This time it was all different, we got a fantastic deal at Imperial Palace, and according to The Unofficial Guide to Las Vegas, “no hotel in Las Vegas has a better location.” I agree, smack dab in the middle of the strip is a prime location, and it was good for the first time, walking around and seeing the sights, but gambling there was a bit too lavish for me, the smallest minimum bet on blackjack we could find was $5.

We did get some good deals for shows at Tix4Tonight, a small little store that sells half price tickets, and since Vegas is scorching, offer yellow umbrellas for shade while waiting in line. We got tickets to see Star Trek: The Experience, which I was dying to see ever since my teacher Trixy Sweetvittles highly recommended it, I figured if someone who’s not into Star Trek liked it I have to like it. Well I did! First we went to Quark’s Bar, where Brian got a Borg Sphere, a crazy (I mean the small does have 5 oz. of alcohol) green drink with dry ice in a fish bowl, and I got Deanna Troi’s Chocolate drink, which was everything I wanted it to be: chocolate, chocolate, and more chocolate. Then we went on the rides, which I have to say before riding them they seem like a cliché 3-D show and a Star Tours rip off, but at the risk of spoilage, I’ll just say that they aren’t. We also got tickets to the absolutely hilarious Second City at the Flamingo, where we probably spent as much on drinks as we did on the tickets.

The next day we just moseyed around on the strip. We finally went far enough south to see MGM, New York-New York, and the Excalibur, and north to see Harrah’s and the Venetian. We also stopped by the Coke store and the M&M store.

Brian and I on the Coca-Cola Polar Bear.


June 24th, 2004

Riding home on my bike today I saw a bumpersticker:


In honor of Fahrenheit 9/11 coming out tomorrow night.

My First Blog

June 9th, 2004

I’ve had way to much time recently. I left my old job last friday and don’t start my new one — yeah for new graphic design, ideal job — until this friday.

So with all this time, I started fixing up the clarinet website because there were some techincal gliches with the photo gallery. Then Brian suggested that I put blog up for news and events type stuff. I started doing that for the clarinet site and realized I really didn’t want to put in all that effort — and then getting my roommate to use it on top of everything. What I really wanted was to have a bolg on my site.

After trying out a few different types of blogs at opensource cms, I ended up going with WordPress. WordPress looked nice as default and setup in 5 seconds flat. But, as always, I couldn’t use the default look, which promted me to redo my whole site with a more stream-lined CSS — I think my pages are about half the lines they used to be because of all those embedded tables. So, here it is!