Nginx启动报错: could not open error log file: open() &q
2016-11-28 14:26
921 查看
启动nginx报如下错误:
nginx: [alert] could not open error log file: open() "/usr/local/nginx/logs/error.log" failed (13:Permission denied)
2014/08/04 20:35:45 [emerg] 17114#0: open() "/usr/local/nginx/logs/access.log" failed (13: Permission denied)
原因:当前用户对该位置没有写入权限
解决办法:
1.使用命令:sudo /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf 以root权限启动
2.使用命令:sudo chmod -R a+rw /usr/local/nginx 给所有用户赋权限(个人学习,不考虑安全问题)
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf 启动Nginx
注:以非root权限启动时,会出现 nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied) 错误
原因:Linux只有root用户可以使用1024一下的端口
解决办法:1.已root权限启动
2.将 /usr/local/nginx/conf/nginx.conf 文件中的80端口改为1024以上
server {
# listen 80
listen 8080
……
}
nginx: [alert] could not open error log file: open() "/usr/local/nginx/logs/error.log" failed (13:Permission denied)
2014/08/04 20:35:45 [emerg] 17114#0: open() "/usr/local/nginx/logs/access.log" failed (13: Permission denied)
原因:当前用户对该位置没有写入权限
解决办法:
1.使用命令:sudo /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf 以root权限启动
2.使用命令:sudo chmod -R a+rw /usr/local/nginx 给所有用户赋权限(个人学习,不考虑安全问题)
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf 启动Nginx
注:以非root权限启动时,会出现 nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied) 错误
原因:Linux只有root用户可以使用1024一下的端口
解决办法:1.已root权限启动
2.将 /usr/local/nginx/conf/nginx.conf 文件中的80端口改为1024以上
server {
# listen 80
listen 8080
……
}
相关文章推荐
- eclipse启动出错:Could not 和An error has occurred.See the log file D:\workspace\.metadata\.log.
- MYSQL 5.7 无法启动(Could not open error log file errno
- Apache启动错误:No such file or directory httpd: could not open error log file......
- Apache启动错误Permission denied: httpd: could not open error log file解决方法
- Windows7安装nginx后,'nginx -t -c nginx.conf' 命令出现 “could not open error log file: CreateFile() "logs/error.log" failed” 错误的原因
- Nginx出现could not open error log file (permission denied)报错
- XAMPP 启动mysql报错 InnoDB: Error: could not open single-table tablespace file……
- VMware虚拟机启动无法进入系统 linux 无法进入图形界面 error: could not open default font 'fixed'
- Mac 下MAMP Pro MySQL无法启动报 Error: could not open single-table tablespace file ./mysql/innodb_table_sta
- VMware虚拟机启动无法进入系统 linux 无法进入图形界面 error: could not open default font 'fixed'
- VMware虚拟机启动无法进入系统 linux 无法进入图形界面 error: could not open default font 'fixed'
- 运行apache时,发生错误:could not open error log file /usr/local/apache/logs/error_log
- Starting httpd: (13)Permission denied: httpd: could not open error log file
- nagios 页面发送命令异常 Error: Could not open command file '/usr/local/nagios/var/rw/nagios.cmd' for update!
- Error 24 Could not delete file 'e:/debug/vc80.idb'. Make sure that the file is not open by another p
- Mysql5.6启动报错, [ERROR] InnoDB: Could not find a valid tablespace file for 'pa
- ORA-15025: could not open disk"...." ORA-27041: unable to open file Linux-x86_64 Error: 13: Permiss
- 无法启动Mysql服务 could not open single-table tablespace file
- oracle启动,提示“LRM-00109: could not open parameter file”
- mysql无法启动ERROR! MySQL is running but PID file could not be found ?