本文出自:2BE

 


更改了 Apache 的 config 想重新套用
大部一定用 service httpd restart 如果您的網站流量很大 ... ( 一秒鍾幾百萬上下
瞬間噴了 2 萬人 ...
等等老闆就找你泡茶了
萬一資料剛好寫到一半
那就更大條了

如何重新套用 config 又保持 apache 的連線呢 ??

/usr/bin/apachectl

Usage: /usr/sbin/httpd [-D name] [-d directory] [-f file]
[-C "directive"] [-c "directive"]
[-k start|restart|graceful|graceful-stop|stop]
[-v] [-V] [-h] [-l] [-L] [-t] [-S]
Options:
-D name : define a name for use in <IfDefine name> directives
-d directory : specify an alternate initial ServerRoot
-f file : specify an alternate ServerConfigFile
-C "directive" : process directive before reading config files
-c "directive" : process directive after reading config files
-e level : show startup errors of level (see LogLevel)
-E file : log startup errors to file
-v : show version number
-V : show compile settings
-h : list available command line options (this page)
-l : list compiled in modules
-L : list available configuration directives
-t -D DUMP_VHOSTS : show parsed settings (currently only vhost settings)
-S : a synonym for -t -D DUMP_VHOSTS
-t -D DUMP_MODULES : show all loaded modules
-M : a synonym for -t -D DUMP_MODULES
-t : run syntax check for config files

看了樂樂腸的 ...help 後

想必也是有看沒有懂 ...

執行 apachectl graceful

apache 設定 reload 後也可保持現有連線了

apachectl 也有 restart 參數看需求在使用

 

arrow
arrow
    全站熱搜

    正義的胖虎 發表在 痞客邦 留言(0) 人氣()