Pid file location even after setting pid directive


I have added pid directive to nginx config.

Pid /home/ubuntu/

Nginx -t -c (conf) also succeeds.

However when I run nginx, and later try to stop it with nginx -s stop, I
get following error:

Open failed (2 No such file or directory,

Please note that nginx is installed under /home/ubuntu/install

Is any other directive missing ?

Thanks in advance

The configuration file used to start the server is the same been used to
stop it?
If you start as
nginx -c /some/confi/file.conf
and stop as
nginx -c /some/confi/file.conf -s stop
it should work.

If you are only doing
nginx -s stop
it will use default configuration that point to another pid file