Is there a way to specify, for example, that the root
should be relative to the directory where the config file is living? Something like
root $conf_path/www
Is there a way to specify, for example, that the root
should be relative to the directory where the config file is living? Something like
root $conf_path/www
You can actually do that using the
-p
option.If you have your config file in the same directory as your app you can run:
from your app folder.
Your
nginx.conf
file changes from:to
just make sure that you check relative links that pointed to
/etc/nginx/
In general, I don't believe this is possible. But, you might be able to hack something together based on this article.
Quoting relevant parts:
and further