I'm setting up some virtual hosts for local web dev. I'm using XAMPP and have been having a nightmare getting it working. Here's my httpd-vhosts.conf file:
NameVirtualHost *:80 <VirtualHost *> DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs" ServerName localhost </VirtualHost> <VirtualHost *> ServerAdmin firstname.lastname@example.org DocumentRoot "/Users/Alex/Documents/Software Development/Web/seo-reports" ServerName seo-reports.local ServerAlias www.seo-reports.local <Directory "/Users/Alex/Documents/Software Development/Web/seo-reports"> Order allow,deny Allow from all </Directory> ErrorLog "/Users/Alex/Documents/Software Development/Web/seo-reports/error.log" CustomLog "/Users/Alex/Documents/Software Development/Web/seo-reports/access.log" common </VirtualHost> <VirtualHost *> DocumentRoot "/Users/Alex/Documents/Software Development/Web/Code By Coady" ServerName codebycoady.local <Directory "/Users/Alex/Documents/Software Development/Web/Code By Coady"> Order allow,deny Allow from all </Directory> </VirtualHost>
But everytime I go to either http://seo-reports.local or http://codebycoady.local, I get forwarded to the /xampp folder, and the splash page. They all direct to the same folder, the original /Applications/XAMPP/xamppfiles/htdocs folder. Any ideas how to fix this?