VirtualTam's bookmarks

  1. Pro: no need to setup a DNS server to test virtualhosts Con: keep in mind that all "fake" hosts will point to 127.0.0.1!

    1. Use /etc/hosts to declare test hosts / domains / subdomains
    #<ip-address>	<hostname.domain.org>	<hostname>
    127.0.0.1	localhost.localdomain	localhost
    127.0.0.1	host.localdomain	host
    127.0.0.1	sub.host.localdomain	sub.host
    ::1		localhost.localdomain	localhost
    
    1. Allow per-user virtualhost definition in either (depending on your distro)
    • /etc/httpd/conf/httpd.conf
    • /etc/apache2/apache2.conf

    Include /home/albert/.httpd/*.conf

    1. Profit! Create virtualhosts with local hostnames :)