Read this post if nginx t prints this error
Daisho Komiyama edited this page Jul 28, 2020
·
1 revision
When you are not root user and if you test nginx with nginx -t
and see this error message;
nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)
2020/07/28 17:31:05 [warn] 4603#4603: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf: ...
nginx: configuration file /etc/nginx/nginx.conf test failed
You need to run test with sudo
sudo nginx -t
Than's it.