VirtualHost at Localhost

So, once I got mod_python running, the next task was to get a Django app up and running on the machine. Which led to my next question, how to I set up an Apache VirtualHost on my local machine. Up to this point, I had deployed all my mod_python apps to the Linux VM running, making it trivial to set up VirtualHosts for all my projects. The answer, as always, was simple.

Simply add your VirtualHost as always, then add it’s name to your hosts file. Talk about a Duh moment.

So I set up a name-based VirtualHost in apache called, for instance, ‘project.local’ (ServerName project.local), then I add a line to my hosts file

127.0.0.1   project.local

Now, I can browse to project.local on my local machine, and everything works.

I don’t think I’ll be looking for any sysadmin jobs in the short term.

There are no comments on this post

Leave a Reply