Hello,
This is not an openresty issue.
I recommend you look at your /etc/sudoers config and find out what sudo is doing to your $PATH. There are many possible things breaking your $PATH, but a good first place to look is the secure_path setting in /etc/sudoers.
It could also be any number of possible bash profiles etc that are highly specific to your system. As a result, the openresty community can not support your issue.
If you compiled openresty with the '--sbin-path' option, the nginx binary will be located there.
Good luck.
-Brandon