0

I have Alpine Linux, 3.15.0 version on the server. The installed nginx version is 1.21.6. I have performed apk update

nginx -t command successfully responds with

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

When I type nginx -s reload server responds with

2023/02/03 10:58:00 [notice] 54#54: signal process started

but nothing actually happens. It's like the process started and that's all.

What am I missing?

1 Answers1

0

According to Nginx documentation, command nginx -s reload actually sends signal to nginx master process and

once the master process receives the signal to reload configuration, it checks the syntax validity of the new configuration file and tries to apply the configuration provided in it. If this is a success, the master process starts new worker processes and sends messages to old worker processes, requesting them to shut down.

Thus, we can consider that nginx is restarted (If we disregard the fact that the master process itself continued to work).

At the same time, if you want to totally restart nginx, you can stop it with nginx -s quit command and then start again. Or that's much better use your system service manager. If I'm not mistaken, there is an open-rc in Alpine, thus command will be rc-service nginx restart.

theKorzh
  • 78
  • 7