I’m a blonde. And this blonde doesn’t really do a whole lot of new sites on her machine. When I do, I like to have a customed URL so I don’t have to type in an IP address everytime. To do that, I have to get into the settings of Apache and my host file on my computer. Because I don’t do this a whole lot, I always forget where the darn files are–especially the Apache config. Sooooo this post is mainly for me to remember where the heck it is and what files need to change. I’m on a Windows system that has XAMPP installed.
First off….
Apache config (C:\xampp\apache\conf\extra\httpd-vhosts.conf):
<VirtualHost *:80> DocumentRoot "C:/xampp/htdocs/where/the/site/is/located" ServerName y.etailz.com ErrorLog "logs/error.log" CustomLog "logs/cust-error.log" common </VirtualHost>
Lastly…..
Host file (may need to run it as admin):
C:\Windows\System32\drivers\etc\hosts file
Restart Apache and viola! You got yourself a customed URL.
Update:
For Ubuntu/Linux users, host file is located: /etc/hosts
and the other file is in the /etc/apache2/sites-available
folder. Remember to enable the conf file.