
Ask HN: Has anyone found a good hands on way to learn nginx.conf? - seph-reed
I&#x27;ve been searching for a playground to learn nginx configuration in, something similar to https:&#x2F;&#x2F;regexr.com&#x2F; but for nginx conf.  Nothing seems to be out there.<p>Has anyone found a good hands on way to learn nginx.conf?
======
NegativeLatency
I'll usually put the following at the top of my conf when I'm trying to get
something to work, and want to test it out interactively (makes it run without
forking, and log to stdout instead of a file you'd then have to tail):

daemon off;

master_process off;

error_log /dev/stdout;

~~~
seph-reed
brilliant. the logging bit has been slow, and this seems very helpful.

> makes it run without forking

what's forking? I didn't find much in a query
([https://duckduckgo.com/?q=nginx+forking](https://duckduckgo.com/?q=nginx+forking))

~~~
NegativeLatency
normally when you start nginx it will start another process, detach it from
your shell and then exit. This leaves the other process running.

[https://en.wikipedia.org/wiki/Daemon_(computing)](https://en.wikipedia.org/wiki/Daemon_\(computing\))
[https://stackoverflow.com/questions/17954432/creating-a-
daem...](https://stackoverflow.com/questions/17954432/creating-a-daemon-in-
linux/17955149#17955149)

When you don't let it fork you can easily hit control c to kill the server,
make some config changes and then restart.

~~~
seph-reed
Ah. Thank you. I did not realize this was called forking.

------
vkaku
Mine is usually modular. You just want to keep all services, hosts and common
things included.

I start with the bare minimum and start adding as need be.

