nginx 安裝 啟動 常見錯誤

2021-09-29 20:48:26 字數 1336 閱讀 8792

安裝:

nginx配置:

日誌引數設定說明:

nginx 啟動

注意:不要直接雙擊nginx.exe,這樣會導致修改配置後重啟、停止nginx無效,需要手動關閉任務管理器內的所有nginx程序

start nginx : 啟動nginx服務

nginx -s reopen :重新開啟日誌檔案

nginx -t -c /path/to/nginx.conf 測試nginx配置檔案是否正確 path/to/nginx.conf 是配置檔案路徑

啟動成功檢查

輸入命令tasklist /fi "imagename eq nginx.exe"

驗證配置是否正確: nginx -t

檢視nginx的版本號:nginx -v

啟動nginx:start nginx

快速停止或關閉nginx:nginx -s stop

正常停止或關閉nginx:nginx -s quit

配置檔案修改重裝載命令:nginx -s reload

1、question 1

nginx錯誤:nginx: [error] openevent("global\ngx_reload_6252") failed (2: the system cannot find the file specified)

執行nginx -s reload命令:

nginx: [error] openevent("global\ngx_reload_6252") failed (2: the system cannot find the file specified)

錯誤原因:

nginx 尚未啟動導致,執行 start nginx 命令開啟nginx

2、question 2 :記事本編輯nginx.conf 導致的錯誤

d:\soft\nginx-1.16.1>nginx -t

nginx: [emerg] unknown directive "鍩? in d:\soft\nginx-1.16.1/conf/nginx.conf:5

nginx: configuration file d:\soft\nginx-1.16.1/conf/nginx.conf test failed

原因及解決:3、question 3:

elk啟動常見錯誤

1 max file descriptors 4096 for elasticsearch process is too low,increase to at least 65536 每個程序最大同時開啟檔案數太小,可通過下面2個命令檢視當前數量 ulimit hn ulimit sn 修改 etc...

nginx安裝啟動

yum y install gcc gcc c autoconf automake yum y install zlib zlib devel openssl openssl devel pcre pcre devel wget nginx在linux環境下可以通過編譯原始碼的方式來安裝,最簡單的安...

nginX 安裝 啟動

解壓 tar zxvf nginx 1.8.0.tar.gz 進入資料夾 root localhost local cd nginx 1.8.0 1.開始安裝 root localhost nginx 1.8.0 configure 檢查環境,生成makefile檔案 報錯,缺少一些庫函式,直接yu...