Linux Nginx相關(guān)問題解決方案
作者:佚名 
  Linux Nginx有很多問題需要我們解決,相關(guān)的問題不停的鞭策我們進(jìn)行學(xué)習(xí)。下面我們就詳細(xì)的看看有關(guān)的技術(shù)問題,希望我們有所收獲。
 希望我的一點經(jīng)驗?zāi)芙o大家?guī)韼椭?,?dǎo)致Linux Nginx出錯的原因也許還有很多,不過在你遇到錯誤時,可以先檢查一下你程序中的字符串,暫時把他們置為,試試看。沒準(zhǔn)就是他引起Linux Nginx問題啊。
- #!/bin/bash
 - # v.0.0.1
 - # create by jackbillow at 2007.10.15
 - # nginx - This shell script takes care of starting and stopping nginx.
 - # chkconfig: - 60 50
 - # description: nginx [engine x] is light http web/proxy server
 - # that answers incoming ftp service requests.
 - # processname: nginx
 - # config: /usr/local/nginx/conf/nginx.conf
 - nginx_path="/usr/local/nginx"
 - nginx_pid="/var/run/nginx/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
 - [ -x $nginx_path/sbin/nginx ] || exit 0
 - RETVAL=0
 - prog="nginx"
 - start() {
 - # Start daemons.
 - if [ -e $nginx_pid -a ! -z $nginx_pid ];then
 - echo "nginx already running...."
 - exit 1
 - fi
 - if [ -e $nginx_path/conf/nginx.conf ];then
 - echo -n $"Starting $prog: "
 - $nginx_path/sbin/nginx -c $nginx_path/conf/nginx.conf &
 - RETVAL=$?
 - [ $RETVAL -eq 0 ] && {
 - touch /var/lock/subsys/$prog
 - success $"$prog"
 - }
 - echo
 - else
 - RETVAL=1
 - fi
 - return $RETVAL
 - }
 - # Stop daemons.
 - stop() {
 - echo -n $"Stopping $prog: "
 - killproc -d 10 $nigx_path/sbin/nginx
 - RETVAL=$?
 - echo
 - [ $RETVAL = 0 ] && rm -f $nginx_pid /var/lock/subsys/$prog
 - }
 - # See how we were called.
 - case "$1" in
 - start)
 - start
 - ;;
 - stop)
 - stop
 - ;;
 - reconfigure)
 - stop
 - start
 - ;;
 - status)
 - status $prog
 - RETVAL=$?
 - ;;
 - *)
 - echo $"Usage: $0 {start|stop|reconfigure|status}"
 - exit 1
 - esac
 - exit $RETVAL
 
以上就是對Linux Nginx的詳細(xì)介紹,希望大家有所收獲。
【編輯推薦】
責(zé)任編輯:張浩 
                    來源:
                    賽迪網(wǎng)
 














 
 
 
 
 
 
 