Welcome! Log In Create A New Profile

Advanced

Restarting only one site on multiple sites configured in nginx

Posted by mrmanishs 
Restarting only one site on multiple sites configured in nginx
April 29, 2009 11:55AM
I have 3 separate web sites set up in a single nginx web server that gets proxied by ip/port. If I do maintenance on one of the sites and need to restart the web server for it to take effect, is it possible to somehow just restart specifically that one site, without having to restart all of nginx? Each site does have a server name associated with it.

Nginx doesn't take long to restart, but I would rather not have any downtime on the other two sites.

Thanks.

Manish
Re: Restarting only one site on multiple sites configured in nginx
April 29, 2009 03:20PM
Try using "reload". There should be no downtime with that.

If you are using the latest version (0.7.53) you can simply run:

# nginx -s reload


If you are on an earlier version, and are running as a Linux service then you can probably use

# service nginx reload

You can confirm that the master process has not been terminated but the workers all have new PID's with

# ps -e | grep nginx

--
Jim Ohlstein
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 73
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready