{"id":573,"date":"2015-02-07T18:36:19","date_gmt":"2015-02-07T16:36:19","guid":{"rendered":"https:\/\/s3lf.de\/blog\/?p=573"},"modified":"2015-02-07T18:36:19","modified_gmt":"2015-02-07T16:36:19","slug":"simple-wildcard-dns-fuer-local-for-web-development-on-ubuntu","status":"publish","type":"post","link":"https:\/\/s3lf.de\/blog\/2015\/simple-wildcard-dns-fuer-local-for-web-development-on-ubuntu\/","title":{"rendered":"Simple Wildcard DNS f&#252;r *.local for Web Development on Ubuntu"},"content":{"rendered":"<p>As a Web developer you often use a local webserver. You might create an own VHost for each project. The next step is to add a domain like\u00a0<code>mycustomer.local<\/code>\u00a0with the IP\u00a0127.0.0.1. This is done by adding a line to your\u00a0\/etc\/hosts file.<\/p>\n<p>If you do not want to add a new entry each time you create a new project to \u00a0<code>\/etc\/hosts<\/code>,\u00a0the is a simple way to add a wild card entry on Ubuntu.<\/p>\n<p>This works, because current\u00a0Ubuntu versions use the Network Manager which itself starts the local DNS server &#8222;dnsmasq&#8220;.<\/p>\n<ol>\n<li>Create a file\u00a0<code>\/etc\/NetworkManager\/dnsmasq.d<\/code>\u00a0with the contents:<br \/>\n<code>address=\/.local\/127.0.0.1<\/code><\/li>\n<li>Restart the network manager.<br \/>\nservice network-manager restart<\/li>\n<li>Check if everything went well<br \/>\n<code># host foobar.local<br \/>\nfoobar.local has address 127.0.0.1<\/code><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>As a Web developer you often use a local webserver. You might create an own VHost for each project. The next step is to add a domain like\u00a0mycustomer.local\u00a0with the IP\u00a0127.0.0.1. This is done by adding a line to your\u00a0\/etc\/hosts file. If you do not want to add a new entry each time you create a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-573","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/s3lf.de\/blog\/wp-json\/wp\/v2\/posts\/573","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/s3lf.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/s3lf.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/s3lf.de\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/s3lf.de\/blog\/wp-json\/wp\/v2\/comments?post=573"}],"version-history":[{"count":2,"href":"https:\/\/s3lf.de\/blog\/wp-json\/wp\/v2\/posts\/573\/revisions"}],"predecessor-version":[{"id":575,"href":"https:\/\/s3lf.de\/blog\/wp-json\/wp\/v2\/posts\/573\/revisions\/575"}],"wp:attachment":[{"href":"https:\/\/s3lf.de\/blog\/wp-json\/wp\/v2\/media?parent=573"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/s3lf.de\/blog\/wp-json\/wp\/v2\/categories?post=573"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/s3lf.de\/blog\/wp-json\/wp\/v2\/tags?post=573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}