I got this error when I followed your instructions
-bash: cd: /var/log/nginx: No such file or directory