linux系統下nginx安裝目錄和nginx.conf配置文件目錄


linux系統下nginx安裝目錄和nginx.conf配置文件目錄

1、查看nginx安裝目錄

輸入命令

# ps  -ef | grep nginx

返回結果包含安裝目錄

root      2662     1  0 07:12 ?        00:00:00 nginx: master process /usr/sbin/nginx

2、查看nginx.conf配置文件目錄

輸入命令

# nginx -t

返回結果包含配置文件目錄

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok

nginx: configuration file /etc/nginx/nginx.conf test is successful

3、啟動nginx服務

[root@localhost ~]# nginx安裝目錄 -c nginx.conf配置文件目錄

參數 “-c” 指定了配置文件的路徑,如果不加 “-c” 參數,Nginx 會默認加載其安裝目錄的 conf 子目錄中的 nginx.conf 文件。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM