Thanks for answering :)
By the way, excellent timing - I have just returned, after long break, to experiments with web development, so I'll definitely make use of this knowledge.
Back then I worked around this problem by preprocessing config files each time the service was started, and I'll probably still have to to this for php and mysql. But it's nice that I won't need it for Nginx anymore.