Nginx突然回应所有我的网站启用本地主机上的错误404

我不知道出了什么问题,但suddendly我的nginx本地主机服务器给我所有我的本地主机上的错误404网站。

通过运行nginx -t我得到这个

 nginx -t nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied) 2017/02/07 22:53:36 [warn] 9580#0: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1 2017/02/07 22:53:36 [warn] 9580#0: conflicting server name "localhost" on 0.0.0.0:80, ignored 2017/02/07 22:53:36 [warn] 9580#0: conflicting server name "localhost" on 0.0.0.0:80, ignored nginx: the configuration file /etc/nginx/nginx.conf syntax is ok 2017/02/07 22:53:36 [emerg] 9580#0: open() "/run/nginx.pid" failed (13: Permission denied) nginx: configuration file /etc/nginx/nginx.conf test failed 

每当我尝试访问我的任何sites-enabled网站,它会引发Error 404

我已经安装和卸载php5-fpm甚至php本身。

依然没有

有任何想法吗?

PS =我在Linux mint Rafael(Ubuntu 14.04)

你需要用所有的特权运行你的命令。

 sudo nginx -t 

它会工作。 我有同样的问题。