Nginx Restart Issues

Solution 1:

Or, you can change the nginx.log file permissions so they match your current user which you use to start nginx:

chown your_user /var/log/nginx/error.log

I suggest you add this permisions to the entire nginx log dir

chown -R your_user /var/log/nginx/

Solution 2:

Just start the nginx as the root user or using sudo

$>sudo /etc/init.d/nginx start

$>sudo service nginx start

Not sure on which operative system you are. Set the user owner in your nginx.conf http://forum.nginx.org/read.php?11,2664

Solution 3:

The nginx master process has root permissions but Amplify-agent periodically performs the command 'nginx -t' by a non-root user. That is the reason for these errors in the error.log

So, you may just ignore these errors.

Check by comparing output from, "sudo nginx -t"