Linux Nginx相关问题解决方案

开发 前端
Linux Nginx有很多问题需要我们解决,相关的问题不停的鞭策我们进行学习。下面我们就详细的看看有关的技术问题,希望我们有所收获。

希望我的一点经验能给大家带来帮助,导致Linux Nginx出错的原因也许还有很多,不过在你遇到错误时,可以先检查一下你程序中的字符串,暂时把他们置为,试试看。没准就是他引起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 
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65.
  • 66.
  • 67.
  • 68.
  • 69.

以上就是对Linux Nginx的详细介绍,希望大家有所收获。

【编辑推荐】

  1. Nginx php安装过程中的技巧点评
  2. 修改Nginx php.ini文件的经典教程
  3. Nginx 启动脚本如何进行自动化启动
  4. nginx配置进行数据输出的两种方式
  5. Nginx状态监控如何实现自己的作用
责任编辑:张浩 来源: 赛迪网
相关推荐

2010-02-24 10:55:01

WCF跨域访问

2010-02-23 17:49:56

WCF传输大数据

2012-05-09 10:08:41

跨机房

2010-09-27 13:14:42

JVM内存限制

2010-03-29 11:10:25

Nginx参数

2011-08-25 18:35:07

Linux cron执

2009-10-28 11:27:49

linux服务器安全

2020-05-06 14:14:50

Linux依赖软件

2010-04-28 19:24:17

Hp unix

2011-03-23 16:38:28

LAMP

2010-10-08 13:09:38

JavaScript数

2010-05-31 12:53:56

Nagios apac

2010-02-06 14:54:11

C++指针漂移

2011-08-10 13:46:36

Navicat MySMySQL

2010-08-26 08:45:32

margin:0pxa

2010-07-30 12:40:00

Flex跨域访问

2010-09-15 14:14:29

IE6position

2010-05-04 11:30:29

Oracle汉字长度

2019-04-04 13:11:37

React内存泄露memory leak

2009-09-03 16:09:48

.net回车符
点赞
收藏

51CTO技术栈公众号