NGINX was built from source using the latest stable build on a debian 9 server. sudo nginx command cannot be found. The NGINX install is located in /usr/local/nginx. How can I configure my server to follow the standard sudo nginx [command] rules? I have tried adding PATH=/usr/sbin/:$PATH which did not work since NGINX is not located in sbin. Thanks
Run echo $PATH
Does it contain /usr/local/sbin
?
If not then add PATH=/usr/sbin/:$PATH
to your .profile file.
Also, check that nginx is installed in /usr/local/sbin
, by going into this directory.
If not then install it by using following commands:
sudo apt update
sudo apt install nginx