nginx control

Vyacheslav slava at skitalets.ru
Wed Aug 16 10:26:13 MSD 2006


Здравствйте, Dmitry!

Tuesday, August 15, 2006, 8:44:14 PM, Вы писали:

SS>> Dmitry Morozovsky wrote:
SS>> > по результатам освоения nginx появилось желание приделать к nginx обработку
SS>> > параметров запуска (не ключей), чтоб он сам собой управлял. Типа
SS>> > nginx reload      HUP
SS>> > nginx rotate      USR1
SS>> > nginx stop        TERM
SS>> > nginx quit        QUIT
SS>> > nginx upgrade     USR2
SS>> > nginx swap        QUIT старому процессу
SS>> Хм, а почему не судьба добавить всё это в "extra_commands" в rc.d/nginx.sh ?

DM> в первую очередь потому что его (nginx.sh) нет в $PATH 

DM> наверное, действительно надо будет сделать nginxctl.

Кому лень писать nginxctl - делюсь.
Содран с apachectl.

Для того, чтобы работал `nginxctl status`, надо в nginx.conf прописать:

http {
    ....
    server {
         listen          127.0.0.1:888;
         server_name     localhost;
         access_log      off;
         location = /stub_status {
             stub_status on;
             allow       127.0.0.0/8;
             deny        all;
         }
         location / { deny all; }
    }
    ...
}

-- 
С уважением,
 Вячеслав                            mailto:slava at skitalets.ru
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nginxctl
Type: application/octet-stream
Size: 3496 bytes
Desc: not available
URL: <http://nginx.org/pipermail/nginx-ru/attachments/20060816/f2a2c689/attachment.obj>


More information about the nginx-ru mailing list