How to make dnsmasq and nginx?

Put dnsmasq in order to go in the development of requests to projects on ip+port to domain names.
Prescribed in dnsmasq.config
listen-address=127.0.0.1
address=/dev/127.0.0.1


in nginx/sites-available/project_1
server {
 listen 80;
 listen [::]:80;
 server_name *.project_1.dev;


project_1.dev is pinged
In the browser 127.0.0.1 - opens the website project_1
In the browser project_1.dev - nothing opens (ERR_CONNECTION_REFUSED)

What to do? Where to look?
April 7th 20 at 15:22
3 answers
April 7th 20 at 15:24
Solution
.dev is no longer working. since this area has become a valid tld under the control of Google.
Cool...
Changed dev to test and it worked - Kim.Emmerich commented on April 7th 20 at 15:27
@Marshall_Prohaska54, whatever, the important thing is not dev.
I use .dvl. - Shanie_Armstrong98 commented on April 7th 20 at 15:30
@Helene.OKeefe32, "whatever" is including some other valid tld? If so, what is special about dev? - Winston.Schoen8 commented on April 7th 20 at 15:33
@Margarita85, that it was actively used for local development, and for some time chrome refuses to recognize the local. - Shanie_Armstrong98 commented on April 7th 20 at 15:36
@Helene.OKeefe32, thank you. - Winston.Schoen8 commented on April 7th 20 at 15:39
April 7th 20 at 15:26
With an asterisk in the source config certainly expected domain 3-level. Type in browser, for example, www.project_1.dev – it should work without changes in the config.

Instead of server_name *.project_1.dev;
should server_name .project_1.dev; (all the same, but without the asterisks)

It would server_name project_1.dev *.project_1.dev;

Cm. the documentation of the module ngx_core_module – server_name
+ if chrome, it is better to use *.test - Garfiel commented on April 7th 20 at 15:29
April 7th 20 at 15:28
look in /etc/resolv.conf
it is there prescribed system DNS server, which uses nginx.
Need to replace existing at 127.0.0.1 - then all will pass through dnsmasq.

Generally instead of dnsmasq could just have a static entry in /etc/hosts to use.
In resolve all spelled out...
Yes, otherwise the address would not bingoville.
And to change everything to 127.0.0.1 failed. Access to external sites fell off. - Kim.Emmerich commented on April 7th 20 at 15:31

Find more questions by tags Domain name systemNginx