高手们给看看啊,这个是报错内容
3 月 23 11:23:59 localhost.localdomain systemd[1]: Starting nginx - high performance web server...
3 月 23 11:23:59 localhost.localdomain nginx[30550]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
3 月 23 11:23:59 localhost.localdomain nginx[30550]: nginx: [emerg] open() "/home/www/log/error.log" failed (13: Permission denied)
3 月 23 11:23:59 localhost.localdomain nginx[30550]: nginx: configuration file /etc/nginx/nginx.conf test failed
3 月 23 11:23:59 localhost.localdomain systemd[1]: nginx.service: control process exited, code=exited status=1
3 月 23 11:23:59 localhost.localdomain systemd[1]: Failed to start nginx - high performance web server.
3 月 23 11:23:59 localhost.localdomain systemd[1]: Unit nginx.service entered failed state.
3 月 23 11:23:59 localhost.localdomain systemd[1]: nginx.service failed.
下面是 nginx.conf 文件内容
================== 配置文件====================
user apache;
worker_processes 1;
error_log /home/www/log/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /home/www/log/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
gzip on;
include /etc/nginx/conf.d/*.conf;
}
======================配置文件=========================
已知 /home/www/log 存在,并且属于 apche 用户名,用户组,为了测试权限,并且尝试给了 777 ,仍旧有问题
这个问题感觉装系统有时候会发生,有时候又没事,很奇怪, apache 也是,其他软件没遇到,感觉好奇怪。