So most of our developers work with a MAMP/XAMPP setup using rewrite rules to point username.project.local
to a document root of /Users/username/Projects/project/public_html
. This part works, but the problem is getting *.local to point to their machine. Instead of tackling this on each developer's machine, I was thinking I could add a rule on our internal DNS, since we already have one set up.
Currently in /var/named/example.com I see
@ IN SOA SERVER1.EXAMPLE.COM. dns.example.com.(
2013020501 ; Serial yyyymmddnn
3h ; Refresh After 3 hours
1h ; Retry Retry after 1 hour
1w ; Expire after 1 week
1h) ; Minimum negative caching of 1 hour
; NS Records
@ 3600 IN NS DNS1.STABLETRANSIT.COM.
@ 3600 IN NS DNS2.STABLETRANSIT.COM.
; MX Records
@ 3600 IN MX 10 ASPMX.L.GOOGLE.COM.
@ 3600 IN MX 20 ALT1.ASPMX.L.GOOGLE.COM.
@ 3600 IN MX 20 ALT2.ASPMX.L.GOOGLE.COM.
@ 3600 IN MX 30 ASPMX2.GOOGLEMAIL.COM.
@ 3600 IN MX 30 ASPMX3.GOOGLEMAIL.COM.
@ 3600 IN MX 30 ASPMX4.GOOGLEMAIL.COM.
@ 3600 IN MX 30 ASPMX5.GOOGLEMAIL.COM.
; Google
mail 3600 IN CNAME ghs.google.com.
docs 3600 IN CNAME ghs.google.com.
mail 3600 IN CNAME ghs.google.com.
calendar 3600 IN CNAME ghs.google.com.
sites 3600 IN CNAME ghs.google.com.
; A Records
@ 3600 IN A ***.***.***.***
; CNAME Records
www 3600 IN A ***.***.***.***
; Staging Environment
server2 3600 IN A 192.168.1.1
*.server2 3600 IN CNAME server2.example.com.
server3 3600 IN A 192.168.1.2
*.server3 3600 IN CNAME server3.example.com.
Is it possible to add a rule so that *.local will resolve to 127.0.0.1?