Answer the question
In order to leave comments, you need to log in
nginx server blocks?
Previously, for development, I deployed nginx to windows in nginx.conf I wrote: server_name site.local
And in the windows hosts file I wrote:
127.0.0.1 site.local
After which I could go to site.local
Recently I decided to switch to a unix-like system (mac os) and I wonder how to do something similar there, or can everything be solved at the nginx level?
Answer the question
In order to leave comments, you need to log in
Unix already has a localhost entry. And it's more correct to add 127.0.1.1 (etc.) to hosts. Including in windows. Localhost may be needed by other programs or the system.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question