sudo: nginx : command not found

I've sshed to a remote vm and have built nginx from source and it works fine.

nginx installation path is /usr/local/nignx/sbin which has been added to both /home/my-username/.bash_profile and /root/.bash_profile; I've logged out sudo pkill -u $USER and ssh connected again.

so far I have bochen> which nginx returns /usr/local/nginx/sbin/nginx

sudo -i then root# which nginx returns: /usr/local/nginx/sbin/nginx

but bochen> sudo nginx return command not found

I don't understand what is going on...

2 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like