Hello!
On Tue, May 24, 2016 at 8:27 PM, 项楠 wrote:
> I install openresty in the default path. my project path is `/root/op`, and
> I start with
> nginx -p `pwd`/ -c conf/nginx.conf
>
>
> But
> 1. openresty still create pid file in `/root/op/logs/`
> 2. when you try `nginx -s reload`, it fails with
> nginx: [error] open() "/usr/local/openresty/nginx/logs/nginx.pid" failed (2:
> No such file or directory)
>
Because you started your nginx with the -p option, then you should
still use that exactly the same -p option when calling nginx with
-sreload.
BTW, do not use nginx -sreload to reload nginx unless you are on
Windows. Always send the HUP signal to your nginx master process
directly. The -s option has unwanted side-effects that may surprise
you (like loading the nginx configuration one more time).
Regards,
-agentzh