Can I set a new virtual host using the server
object in the nginx.conf
configuration file, without restarting the server (and without closing the active connections)?
Thanks
You need to reload or restart Nginx whenever you make changes to its configuration. The reload command loads the new configuration, starts new worker processes with the new configuration, and gracefully shuts down old worker processes.
NGINX is popular web hosting and reverse proxy software for Linux systems. Like many other applications and services, it occasionally needs restarted. Restarting is especially common when making updates to configuration files. You'll always need to restart or reload NGINX for the changes to take effect.
the reload command of nginx is for reload of configuration files ,and during the progress , there's no downtime of the service .
Yes you can.
nginx -s reload
Or you can send SIGHUP
to the nginx process.
sudo kill -HUP [nginx's pid]
You can Load New Configuration Using Signals. It will
You can even Upgrade To a New Binary On The Fly. See the same doc.
To perform the reload, send the reload
signal:
nginx -s reload
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With