mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf
File locations:
nginx.confto/usr/local/etc/nginx/default.confanddefault-ssl.confto/usr/local/etc/nginx/sites-availablehomebrew.mxcl.nginx.plistto/Library/LaunchDaemons/
Not documented yet:
- How to create self-signed SSL certificates
- How to start and stop Nginx
The hosts files is found at
/etc/hostsin both Mac OS and Unix systems.Typically, you can type
and it will open the file, if you have
nanoinstalled. There is a good chance you have nano installed. Try it, if not, use your favourite text editor. Make sure you open the file with elevated privileges so you can save it. It is a system file.As mentioned above, you can also use
dnsmasqwhich auto forwards *.dev domains in your browser to localhost.