There is a new version of the nginx web server – nginx-0.5.24 . Too many upgrades recently :( From the changelog:
I have a small ugly shell script for upgrading:Bugfix: a part of response body may be passed uncompressed if gzip was used; bug appeared in 0.5.23.
#!/bin/sh
VER=0.5.24
if [ ! -d ~/Work/nginx-${VER} ]; then
cd ~/Work
wget http://sysoev.ru/nginx/nginx-${VER}.tar.gz && \
tar xvzf nginx-${VER}.tar.gz
fi
if [ -d ~/Work/nginx-${VER} ]; then
cd ~/Work/nginx-${VER} && ./configure --prefix=/opt/nginx \
--with-openssl=/usr/lib/ --with-sha1=/usr/lib \
--with-http_realip_module --with-http_ssl_module && make
fi
The interesting part is after the installation – upgrade the server executable “on the fly” , without restarting:
% cd ~/Work/nginx-0.5.24 % sudo make install % sudo kill -USR2 `cat /opt/nginx/logs/nginx.pid` % tail -f /opt/nginx/logs/error.log 2007/06/07 14:27:23 [notice] 4382#0: signal 12 (SIGUSR2) received, changing binary 2007/06/07 14:27:23 [notice] 4382#0: changing binary 2007/06/07 14:27:23 [notice] 4382#0: start new binary process 6500 2007/06/07 14:27:23 [notice] 6500#0: using inherited sockets from "6;7;" 2007/06/07 14:27:23 [notice] 6500#0: using the "epoll" event method 2007/06/07 14:27:23 [notice] 6500#0: nginx/0.5.24
Well done software = happy sysadmin = happy users :)
