I
I
Ivan2014-11-09 20:40:36
linux
Ivan, 2014-11-09 20:40:36

How to set up wildcard subdomains on a local web server?

For development on a local machine for sites, I use domains like mysite.local, add new lines to /etc/hosts.
There was a need to configure wildcard subdomains (so that all requests from *.mysite.local go to mysite.local).
On the combat machine, this is done using cname * site.com and server_name .site.com in nginx, but what about the local one?
In numerous questions on SO they write that /etc/hosts does not allow setting up wildcard subdomains, dnsmasq is advised. I tried to set it up as they say in the article , but it did not help.
PS Ubuntu 14.04
PPS The article says that .local cannot be used. I tried with mysite.dev - the same thing.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2014-11-10
@0neS

install and configure bind
100% works I use it myself

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question