Steps taken so far:
- Installed dnsmasq
nameserver 127.0.0.1is in /etc/resolv.conf
prepend domain-name-servers 127.0.0.1;in /etc/dhcp3/dhclient.conf
- Created a vhost for example.dev
- Restarted apache and dnsmasq
Note: example.dev is not set in /etc/hosts
My vhost for example.dev
<VirtualHost *:80> ServerName example.dev DocumentRoot /home/jkendall/public_html/example/public ServerAlias *.example.dev # This should be omitted in the production environment SetEnv APPLICATION_ENV development <Directory /home/jkendall/public_html/example/public> DirectoryIndex index.php AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>
The setup above will server example.dev locally without any problem. It will also serve test.example.dev, but test.example.dev returns the default apache "It works!" index.html from /var/www rather than my index.php in /home/jkendall/public_html/example/public.
The solution in this Server Fault thread suggests that
would resolve my problem, but when I try to use that solution, restarting dnsmasq results in a failure with the error message
dnsmasq: error at line 62 of /etc/dnsmasq.conf
For grins, I moved my project over to /var/www/example and modified the vhost appropriately. I got the same result as described above.
At this point I'm not sure what other steps I can take to resolve the issue. Thoughts?