在Windows下使用Nginx,我們需要掌握一些基本的操作命令 , 比如:啟動、停止Nginx服務,重新載入Nginx等,下面我就進行一些簡單的介紹 。
1、啟動:
C:\server\nginx-1.0.2>start nginx或
C:\server\nginx-1.0.2>nginx.exe【windows7nginx開機啟動步驟 windows啟動nginx命令】注:建議使用第一種,第二種會使你的cmd窗口一直處于執(zhí)行中 , 不能進行其他命令操作 。
2、停止:
C:\server\nginx-1.0.2>nginx.exe -s stop或
C:\server\nginx-1.0.2>nginx.exe -s quit注:stop是快速停止nginx , 可能并不保存相關信息;quit是完整有序的停止nginx,并保存相關信息 。
3、重新載入Nginx:
C:\server\nginx-1.0.2>nginx.exe -s reload當配置信息修改 , 需要重新載入這些配置時使用此命令 。

文章插圖
4、重新打開日志文件:
C:\server\nginx-1.0.2>nginx.exe -s reopen5、查看Nginx版本:
C:\server\nginx-1.0.2>nginx -v nginx: nginx version: nginx/1.0.2或
C:\server\nginx-1.0.2>nginx -V nginx: nginx version: nginx/1.0.2 nginx: TLS SNI support enabled nginx: configure arguments: --builddir=objs.msvc8 --crossbuild=win32 --with-debug --prefix= --conf-path=conf/nginx.conf --pid-path=logs/nginx.pid --http-log-path=logs/access.log --error-log-path=logs/error.log --sbin-path=nginx.exe --http-client-body-temp-path=temp/client_body_temp --http-proxy-temp-path=temp/proxy_temp --http-fastcgi-temp-path=temp/fastcgi_temp --with-cc-opt=-DFD_SETSIZE=1024 --with-pcre=objs.msvc8/lib/pcre-7.9 --with-zlib=objs.msvc8/lib/zlib-1.2.3 --with-select_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_stub_status_module --with-http_flv_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-mail --with-ipv6 --with-openssl=objs.msvc8/lib/openssl-0.9.8r --with-openssl-opt=enable-tlsext --with-http_ssl_module --with-mail_ssl_module注:v只是簡單顯示版本信息,V不但顯示版本信息,還顯示配置參數(shù)信息 。
6、測試或載入指定配置文件:
測試配置文件
C:\server\nginx-1.0.2>nginx.exe -t -c conf/default.conf nginx: the configuration file C:\server\nginx-1.0.2/conf/default.conf syntax isoknginx: configuration file C:\server\nginx-1.0.2/conf/default.conf test is successful載入指定配置文件
C:\server\nginx-1.0.2>start nginx.exe -c conf/default.conf本文介紹的這幾個命令都是非?;A的 , 很空間記?。?多嘗試幾次就可以了
以上關于本文的內(nèi)容,僅作參考!溫馨提示:如遇健康、疾病相關的問題,請您及時就醫(yī)或請專業(yè)人士給予相關指導!
「愛刨根生活網(wǎng)」www.malaban59.cn小編還為您精選了以下內(nèi)容,希望對您有所幫助:- 提升虎牙直播使用體驗:設置開機時自動啟動
- Windows 11如何啟動屏幕鍵盤
- UEFI啟動盤制作詳細教程
- 如何在華碩電腦上設置大白菜U盤啟動
- Windows 10設置開機登錄密碼的重要性
- 如何自定義Win7系統(tǒng)開機界面壁紙
- 如何使用Win 10任務計劃程序添加啟動程序
- 如何在IcoFX中設置啟動時不顯示歡迎窗口
- BIOS設置U盤啟動方法及注意事項
- 如何設置電腦的開機密碼保護
