ðòïåëôù 


  áòèé÷ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  óôáôøé 


  ðåòóïîáìøîïå 


  ðòïçòáííù 



ðéûéôå
ðéóøíá












     áòèé÷ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

restart nginx


  • To: nginx-ru@xxxxxxxxx
  • Subject: restart nginx
  • From: áÌÅËÓÅÊ íÁÓÌÅÎÎÉËÏ× <minisotm@xxxxxxxxx>
  • Date: Wed, 3 Aug 2011 13:27:45 +0400
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; bh=Ot2omha/bPvQUYnsNeYV5TM+RddNhOmsAnLZp2IRl8E=; b=LGESSUF8fKQBuiPZB+ZePYwXb7lu1T4lKUgT9mzmuIKS2ON5/VulJJtK05ybXfpB23 hBmY5gJxeSa6XwMlJ+ng8NPFtB3H2CavUk9veB6NjIynHOP1jf8X7xGwSvKqI+xKk5hz d16eS01apf6MKrRRTjEi81l7Nsu3Ubrjzh6cg=

äÏÂÒÏÅ ×ÒÅÍÑ ÓÕÔÏË ×ÓÅÍ!

ÎÁ ÓÉÓÔÅÍÅšCentOS release 5.3 (Final)

ÐÅÒÅÓÏÂÒÁÌ nginx :

nginx: nginx version: nginx/1.0.5
nginx: TLS SNI support disabled
nginx: configure arguments: --user=nginx --group=nginx --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --pid-path=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_perl_module --with-mail --with-mail_ssl_module --with-http_image_filter_module --with-pcre=/usr/local/src/nginx/pcre-8.12/

úÁÐÕÓËÁÅÔÓÑ ÒÁÚÁ Ó 5-ÇÏ, restart ÐÉÛÅÔ ÞÔÏ ×ÓÅ ïë, ÎÏ ÎÅ ÒÁÂÏÔÁÅÔ . /etc/init.d/nginx

cat /etc/init.d/nginx
#!/bin/sh
#
# nginx - this script starts and stops the nginx daemon
#
# chkconfig: š - 85 15š
# description: šNginx is an HTTP(S) server, HTTP(S) reverse \
# š š š š š š š proxy and IMAP/POP3 proxy server
# processname: nginx
# config: š š š/etc/nginx/nginx.conf
# config: š š š/etc/sysconfig/nginx
# pidfile: š š /var/run/nginx.pid
š
# Source function library.
. /etc/rc.d/init.d/functions
š
# Source networking configuration.
. /etc/sysconfig/network
š
# Check that networking is up.
[ "$NETWORKING" = "no" ] && exit 0
š
nginx="/usr/sbin/nginx"
prog=$(basename $nginx)
š
NGINX_CONF_FILE="/etc/nginx/nginx.conf"
š
[ -f /etc/sysconfig/nginx ] && . /etc/sysconfig/nginx
š
lockfile=/var/lock/subsys/nginx
š
make_dirs() {
š š# make required directories
š šuser=`nginx -V 2>&1 | grep "configure arguments:" | sed 's/[^*]*--user=\([^ ]*\).*/\1/g' -`
š šoptions=`$nginx -V 2>&1 | grep 'configure arguments:'`
š šfor opt in $options; do
š š š šif [ `echo $opt | grep '.*-temp-path'` ]; then
š š š š š švalue=`echo $opt | cut -d "=" -f 2`
š š š š š šif [ ! -d "$value" ]; then
š š š š š š š š# echo "creating" $value
š š š š š š š šmkdir -p $value && chown -R $user $value
š š š š š šfi
š š š šfi
š šdone
}
š
start() {
š š [ -x $nginx ] || exit 5
š š [ -f $NGINX_CONF_FILE ] || exit 6
š š make_dirs
š š echo -n $"Starting $prog: "
š š daemon $nginx -c $NGINX_CONF_FILE
š š retval=$?
š š echo
š š [ $retval -eq 0 ] && touch $lockfile
š š return $retval
}
š
stop() {
š š echo -n $"Stopping $prog: "
š š killproc $prog -QUIT
š š retval=$?
š š echo
š š [ $retval -eq 0 ] && rm -f $lockfile
š š return $retval
}
š
restart() {
š š configtest || return $?
š š stop
š š sleep 1
š š start
}
š
reload() {
š š configtest || return $?
š š echo -n $"Reloading $prog: "
š š killproc $nginx -HUP
š š RETVAL=$?
š š echo
}
š
force_reload() {
š š restart
}
š
configtest() {
š $nginx -t -c $NGINX_CONF_FILE
}
š
rh_status() {
š š status $prog
}
š
rh_status_q() {
š š rh_status >/dev/null 2>&1
}
š
case "$1" in
š š start)
š š š š rh_status_q && exit 0
š š š š $1
š š š š ;;
š š stop)
š š š š rh_status_q || exit 0
š š š š $1
š š š š ;;
š š restart|configtest)
š š š š $1
š š š š ;;
š š reload)
š š š š rh_status_q || exit 7
š š š š $1
š š š š ;;
š š force-reload)
š š š š force_reload
š š š š ;;
š š status)
š š š š rh_status
š š š š ;;
š š condrestart|try-restart)
š š š š rh_status_q || exit 0
š š š š š š ;;
š š *)
š š š š echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest}"
š š š š exit 2
esac


ëÁË ÜÔÏ ÏÔÄÅÂÁÖÉÔØ ? óÐÁÓÉÂÏ.

_______________________________
ó õ×ÁÖÅÎÉÅÍ, áÌÅËÓÅÊ íÁÓÌÅÎÎÉËÏ×

Jabber: minisotm@xxxxxxxxx
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.