Answer the question
In order to leave comments, you need to log in
Nginx won't start, but config check doesn't show any errors?
Nginx 1.12.0, Linux RH 7.2
Installed, made a config - checking the config shows that everything is OK:
nginx: the configuration file /etc/nginx/conf.d/ev1.conf syntax is ok
nginx: configuration file /etc/nginx/conf .d/ev1.conf
test
is
successful
See "systemctl status nginx.service" and "journalctl -xe" for details.
looking at logs:
Starting nginx - high performance web server...
nginx: [emerg] "events" directive is not allowed here in /etc/nginx/conf.d/ev1.conf:1
nginx: configuration file /etc/nginx/ nginx.conf test failed
nginx.service: control process exited, code=exited status=1
I start it with the standard config - it starts without errors. I return a config - again errors. How to understand what is wrong with the config (the config test is fine).
Answer the question
In order to leave comments, you need to log in
"events" directive is not allowed here in /etc/nginx/conf.d/ev1.conf:1
nginx -t
check on behalf of the user under which nginx starts in systemd
, for example
sudo -u %user% nginx -t
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question