自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Linux Nginx基本操作與配置

開發(fā) 前端
希望我的一點經(jīng)驗能給大家?guī)韼椭?,導致Linux Nginx出錯的原因也許還有很多,不過在你遇到錯誤 時,可以先檢查一下你程序中的字符串,暫時把他們置為,試試看。沒準就是他引起的問題啊。

Linux Nginx是我們經(jīng)常需要使用的命令環(huán)境。在這其中我們需要不斷的學習,下面就是一些對Linux Nginx的詳細介紹希望大家有所收獲。激情體驗,好事多磨你會找到他的樂趣。

  1. #!/bin/sh  
  2. # nginx - this script starts and stops the nginx daemin  
  3. # chkconfig: - 85 15   
  4. # description: Nginx is an HTTP(S) server, HTTP(S) reverse \  
  5. # proxy and IMAP/POP3 proxy server  
  6. # processname: nginx  
  7. # config: /etc/nginx/nginx.conf  
  8. # config: /etc/sysconfig/nginx  
  9. # pidfile: /var/run/nginx.pid  
  10. # Source function library.  
  11. . /etc/rc.d/init.d/functions  
  12. # Source networking configuration.  
  13. . /etc/sysconfig/network  
  14. # Check that networking is up.  
  15. [ "$NETWORKING" = "no" ] && exit 0  
  16. nginx="/usr/sbin/nginx" 
  17. prog=$(basename $nginx)  
  18. NGINX_CONF_FILE="/etc/nginx/nginx.conf" 
  19. [ -f /etc/sysconfig/nginx ] && . /etc/sysconfig/nginx  
  20. lockfile=/var/lock/subsys/nginx  
  21. start() {  
  22. [ -x $nginx ] || exit 5  
  23. [ -f $NGINX_CONF_FILE ] || exit 6  
  24. echo -n $"Starting $prog: "  
  25. daemon $nginx -c $NGINX_CONF_FILE  
  26. retval=$?  
  27. echo  
  28. [ $retval -eq 0 ] && touch $lockfile  
  29. return $retval  
  30. }  
  31. stop() {  
  32. echo -n $"Stopping $prog: "  
  33. killproc $prog -QUIT  
  34. retval=$?  
  35. echo  
  36. [ $retval -eq 0 ] && rm -f $lockfile  
  37. return $retval  
  38. }  
  39. restart() {  
  40. configtest || return $?  
  41. stop  
  42. start  
  43. }  
  44. reload() {  
  45. configtest || return $?  
  46. echo -n $"Reloading $prog: "  
  47. killproc $nginx -HUP  
  48. RETVAL=$?  
  49. echo  
  50. }  
  51. force_reload() {  
  52. restart  
  53. }  
  54. configtest() {  
  55. $nginx -t -c $NGINX_CONF_FILE  
  56. }  
  57. rh_status() {  
  58. status $prog  
  59. }  
  60. rh_status_q() {  
  61. rh_status >/dev/null 2>&1  
  62. }  
  63. case "$1" in  
  64. start)  
  65. rh_status_q && exit 0  
  66. $1  
  67. ;;  
  68. stop)  
  69. rh_status_q || exit 0  
  70. $1  
  71. ;;  
  72. restart|configtest)  
  73. $1  
  74. ;;  
  75. reload)  
  76. rh_status_q || exit 7  
  77. $1  
  78. ;;  
  79. force-reload)  
  80. force_reload  
  81. ;;  
  82. status)  
  83. rh_status  
  84. ;;  
  85. condrestart|try-restart)  
  86. rh_status_q || exit 0  
  87. ;;  
  88. *)  
  89. echo $"Usage: $0 {start|stop|status|restart|condrestart|
    try-restart|reload|force-reload|configtest}"  
  90. exit 2  
  91. esac 

以上就是對Linux Nginx的詳細介紹希望大家有所幫助。

【編輯推薦】

  1. nginx內(nèi)核參數(shù)相關的優(yōu)化設定
  2. Nginx Resin安裝中的相關技巧和操作流程
  3. nginx resin相關程序的代碼介紹
  4. Nginx反向代理支持的各種編程語言
  5. Nginx php安裝過程中的技巧點評
責任編輯:張浩 來源: 互聯(lián)網(wǎng)
相關推薦

2011-01-11 14:56:51

Linux基本操作

2009-06-12 15:13:12

Hibernate學習

2010-03-29 10:12:04

Nginx優(yōu)化設置

2010-02-03 15:19:28

Linux yum

2010-02-04 14:15:05

Linux Nginx

2015-07-23 11:36:28

GIT入門

2011-01-05 09:59:17

2009-12-22 14:43:38

Linux操作系統(tǒng)

2022-04-08 08:40:36

Nginx日志服務器

2016-12-29 12:42:45

Linux操作命令

2010-03-29 10:26:06

Nginx配置文件

2011-04-21 09:54:14

Linuxiptables

2009-12-02 16:47:42

Linux操作系統(tǒng)

2024-01-24 13:40:45

2009-12-24 15:53:53

Linux配置wpa

2016-01-29 14:32:19

Linux軟件包管理

2023-05-11 08:59:43

Nginx配置服務器

2009-06-04 15:58:55

Struts原理基本配置

2010-08-06 15:44:11

Linux服務器

2013-06-05 13:31:25

點贊
收藏

51CTO技術棧公眾號