hi,
I attach a patch which add the -p option to nginx. This option
overrides the --prefix path and also the $NGX_CONF_PREFIX variable
which is used as prefix for "include" directives. So, all relative
path will be prefix with the value of this option.
I don't know if it covers all cases but it seems ok in my env.
Why did I want to make such a patch ?
Because i'll be running several instances of nginx on the same box,
with similar conf and similar directorys (/path/xx/conf,
/path/xx/docs, /path/xx/logs, /path/xx/cache, /path/xx/tmp, ...). With
same conf, I can launch multiple instances of nginx with
/path/to/nginx -p /path/www, -p /patch/www2, ...
I could run one instance of nginx with many "server" directives but
the box is mutualized between clients and clients doesn't want to
share their instance with others ...
You could then imagine many cases in which this option could be usefull.
++ jerome