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

matlab - Deleting rows with specific rules -

image - ClassNotFoundException when add a prebuilt apk into system.img in android -