osx - dnsmasq & multiple addresses -


i'm using dnsmasq local development environment want use multiple tlds, dnsmasq.conf file looks this

address=/.dev/127.0.0.1 

& apache http-vhosts.conf looks this

<virtualhost *:80>   usecanonicalname off   virtualdocumentroot "/users/<username>/sites/dev/%1"   serveralias *.gabri   logformat "%v %h %l %u %t \"%r\" %s %b" vcommon   errorlog "/users/<username>/sites/dev/vhosts-error_log" </virtualhost> 

and configuration works, create new folder called 'client' example can access client.dev.

now want add tld let's .test how can done? guess in apache it's same replacing dev test, dnsmasq?

in dnsmasq.conf add:

address=/.test/127.0.0.1 

in http-vhosts.conf add:

<virtualhost *:80>   usecanonicalname off   virtualdocumentroot "/users/<username>/sites/test/%1"   serveralias *.test </virtualhost> 

create file "/etc/resolvers/test" content:

nameserver 127.0.0.1 

more info resolver thing. edit "/etc/hosts" file. prefer /etc/resolvers solution.

do not forget flush dns caches afterwards.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -