Good Day.
I'm setting up a mac for local development and have configured dnsmasq.conf with the following:
address=/.dev/127.0.0.1
My wish is to run sites locally by http://client1.ext.dev/index.html
which will map to a local folder of /www/sites/client1.ext/htdocs/index.html
. Of course the variables here are client#
and it's associated ext
which could be any normal TLD -- .com, .net, .info, etc.
I've tried every permutation that I could think of, but I can't seem to get the httpd.conf to map correctly (technically my httpd-vhosts.conf file).
<Virtualhost *:80>
VirtualDocumentRoot /www/sites/%-2+/htdocs
#ServerName sites.dev
ServerAlias *.dev
UseCanonicalName Off
</Virtualhost>
Using this uri in my browser client1.com.dev/index.html
, my log files reads File does not exist: /www/sites/client1.com
Why won't the remaining mapping of VirtualDocumentRoot not work? (The "/htdocs" part is not being added.).
Many posts indicate that it should, but the man page (http://goo.gl/Ghff5G) doesn't show any additional directories beyond the %-mapping.
I've also tried RewriteRules within my directives to no avail (and I'm pretty sure I wasn't doing that correctly).
Bonus
If I have a sub-domain, my browser just goes out to OpenDNS (which I have configured to default after my internal IP) and says it can't find sub.client1.com.dev
which I'd like to map to /www/sites/sub.client1.com/htdocs
.
Thank you!
/www/sites/client1.com
exist?http://client1.com.dev
still not resolving, so I cp the dir and renamed tohttp://anything.com.dev
-- and it works. Grrr. Still beating head ashttp://client1.com.dev
is not. However,http://client1.com.dev/index.html
DOES work (as doeshttp://anyting.com.dev/index.html
Ugh. No clue as to why. I don't see any differences anywhere.http://sub.client1.com.dev
maps to/www/sites/sub.client1.com/htdocs
. Any takers?