[Patch] add -p option to override prefix
Jérôme Loyet
jerome at loyet.net
Tue Mar 24 18:46:03 MSK 2009
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nginx-prefix.patch
Type: application/octet-stream
Size: 1990 bytes
Desc: not available
URL: <http://nginx.org/pipermail/nginx/attachments/20090324/90bea4ac/attachment.obj>
More information about the nginx
mailing list