1. 程式人生 > >nginx服務相關操作

nginx服務相關操作

body cti pre fig lob -c cal efault -s

安裝目錄

和大多軟件一樣一般安裝在 /usr/local/ 目錄下
/usr/local/

命令man

Usage: nginx [-?hvVt] [-s signal] [-c filename] [-p prefix] [-g directives]
Options:
-?,-h         : this help
-v            : show version and exit
-V            : show version and configure options then exit
-t            : test configuration and exit
-s signal     : send signal to a master process: stop, quit, reopen, reload
-p prefix     : set prefix path (default: /usr/local/nginx/)
-c filename   : set configuration file (default: conf/nginx.conf)
-g directives : set global directives out of configuration file

服務開啟停止等操作

開啟

/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

重啟

/usr/local/nginx/sbin/nginx -s reload
/usr/local/nginx/sbin/nginx -s reatart

關閉

/usr/local/nginx/sbin/nginx -s stop

nginx服務相關操作