Tips and tricks on developing web sites

httpd-vhosts.conf for Non-SSL Sites

Apache is wonderful in that it can host numerous sites at the same time. The logic for those sites is stored in C:\xampp\apache\conf\httpd-vhosts.conf. To point Apache at example.com, add this configuration:

<VirtualHost *:80>
    ServerAdmin info@example.com
    DocumentRoot "C:/xampp/htdocs/public_html"
    ServerName example.com
    ServerAlias www.example.com
    ErrorLog "logs/example.com-error.log"
    CustomLog "logs/example.com-access.log" common
</VirtualHost>

If you are using an add-on domain, it would be:

<VirtualHost *:80>
    ServerAdmin info@example.com
    DocumentRoot "C:/xampp/htdocs/public_html"
    ServerName example.com
    ServerAlias www.example.com
    ErrorLog "logs/example.com-error.log"
    CustomLog "logs/example.com-access.log" common
</VirtualHost>

Be sure to change webmaster@example.com to whatever email you will be using. I usually set up a catch-all email as info@example.com. The default webmaster seems kind of dated to me.

In the XAMPP Control Panel stop and start the Apache module. Go to your browser and type in example.com. If you did everything correctly you will be into the WordPress setup.