Opened 7 years ago

Closed 7 years ago

#1289 closed defect (fixed)

Nginx 1.12.0 unable to start after initial installation on RHEL 7 if access_log is uncommented

Reported by: shekharshan@… Owned by:
Priority: minor Milestone:
Component: nginx-package Version: 1.9.x
Keywords: Cc:
uname -a: Linux 3.10.0-514.el7.x86_64 #1 SMP Wed Oct 19 11:24:13 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.12.0


On RHEL 7 I installed Nginx by adding a yum repo

name=nginx repo

After installation I updated /etc/nginx/conf.d/default.conf and uncommented the line

access_log /var/log/nginx/log/host.access.log main;

Then I tried to start the nginx.service systemd unit

-- Unit nginx.service has begun starting up.
Jun 05 16:43:23 nginx[2960]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Jun 05 16:43:23 nginx[2960]: nginx: [emerg] open() "/var/log/nginx/log/host.access.log" failed (2: No such file or directory)
Jun 05 16:43:23 nginx[2960]: nginx: configuration file /etc/nginx/nginx.conf test failed
Jun 05 16:43:23 systemd[1]: nginx.service: control process exited, code=exited status=1
Jun 05 16:43:23 systemd[1]: Failed to start nginx - high performance web server.

When I change the access_log in default.conf to /var/log/nginx/access.log then I was able to successfully start the service.

Perhaps making that access_log value change in default.conf will fix this issue.

Change History (3)

comment:1 by Maxim Dounin, 7 years ago

Component: othernginx-package

comment:2 by thresh, 7 years ago

Thanks! I've commited the changes to the packaging sources - the package for the next 1.12 stable release will have the fix.

comment:3 by Sergey Budnevitch, 7 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.