For a while I browsed all my web projects as a folder off of localhost. When I would browse my development site for Scott Reed Design the url would be http://localhost/srd. A while ago after a little Googling I found that I can have true “domain” names for all my projects on my local development machine. Now working on my development Scott Reed Design site the url is http://srd.
My development platform is Apache on Windows XP but the following instructions will work for either Windows or Mac running Apache.
Step 1
Alter the hosts file by creating a “domain” and pointing it at your computer.
127.0.0.1 scottreeddesign
The IP address above represents a machine’s local IP.
Step 2
Alter the configuration file (httpd.conf) for the Apache HTTP Server by adding a virtual host record at the very end of the file.
<VirtualHost 127.0.0.1>
DocumentRoot"C:\wamp\www\scottreeddesign"
ServerName scottreeddesign
ErrorLog logs/scottreeddesign_error.log
</VirtualHost>
The above record tells where the site files are, what the server name is and where to save error logs.
That’s it. Simple as can be. Let me know if this makes your development easier. Thanks!