A
A
Alexander Konovalov2019-07-12 03:00:27
Nginx
Alexander Konovalov, 2019-07-12 03:00:27

Why is nginx not starting?

Hello! After editing nginx.conf, I restart nginx. Gives an error message:

[....] Restarting nginx (via systemctl): nginx.serviceJob for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.
 failed!

Changes made:
location ~* \.(txt|xml|js)$ {
    expires 8d;
}

location ~* \.(css)$ {
    expires 8d;
}

location ~* \.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|svg)$ {
    expires 8d;
}

location ~* \.(jpg|jpeg|png|gif|swf|webp)$ {
    expires 8d;
}

What's wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2019-07-12
@shambler81

expires 8d; - replace with expires max; - google page speed requirements.
Now on the points
1. journalctl -xe- you have already been written
2. nginx -t
3. just look at what is in the nginx log

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question