安裝好Nginx后就可以查看nginx中的各種資訊了,
一、Nginx組態檔
rpm -ql nginx //查看所有檔案
/etc/logrotate.d/nginx
日志輪轉
/etc/nginx/nginx.conf
總組態檔
/etc/nginx/conf.d
子組態檔夾
/etc/nginx/conf.d/default.conf
默認的網站組態檔
/etc/nginx/fastcgi_params
動態網站模塊檔案-python,php所需的相關變數
/etc/nginx/scgi_params
/etc/nginx/uwsgi_params
/etc/nginx/koi-utf
字符集,檔案編碼
/etc/nginx/win-utf
/etc/nginx/koi-win
/etc/nginx/mime.types
檔案關聯程式
網站檔案型別 和 相關處理程式
/etc/nginx/modules
模塊檔案夾,第三方模塊
/etc/sysconfig/nginx
# Configuration file for the nginx service.
NGINX=/usr/sbin/nginx
CONFFILE=/etc/nginx/nginx.conf
/etc/sysconfig/nginx-debug
# Configuration file for the nginx-debug service.
NGINX=/usr/sbin/nginx-debug
CONFFILE=/etc/nginx/nginx.conf
LOCKFILE=/var/lock/subsys/nginx-debug
/usr/lib/systemd/system/nginx-debug.service
nginx除錯程式啟動腳本
/usr/lib/systemd/system/nginx.service systemctl
服務腳本,
/usr/sbin/nginx
主程式
/usr/sbin/nginx-debug
nginx除錯程式
/usr/share/doc/nginx-1.12.1
檔案
/usr/share/doc/nginx-1.12.1/COPYRIGHT
/usr/share/man/man8/nginx.8.gz
man 手冊
/usr/share/nginx
/usr/share/nginx/html
/usr/share/nginx/html/50x.html
/usr/share/nginx/html/index.html
默認主頁
/var/cache/nginx
快取各種
ls /var/cache/nginx/
client_temp fastcgi_temp proxy_temp scgi_temp uwsgi_temp
/var/log/nginx
日志檔案夾
ls /var/log/nginx/
access.log error.log
/usr/lib64/nginx
Nginx模塊目錄
二、nginx編譯引數
nginx -V
1、基本配置
nginx version: nginx/1.14.1
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC)
built with OpenSSL 1.0.2k-fips 26 Jan 2017
TLS SNI support enabled
configure arguments:
配置引數./configure --help查詢幫助
--prefix=/etc/nginx
安裝路徑
--sbin-path=/usr/sbin/nginx
程式檔案
--modules-path=/usr/lib64/nginx/modules
模塊路徑
--conf-path=/etc/nginx/nginx.conf
主組態檔
--error-log-path=/var/log/nginx/error.log
錯誤日志
--http-log-path=/var/log/nginx/access.log
訪問日志
--pid-path=/var/run/nginx.pid
程式ID
--lock-path=/var/run/nginx.lock
鎖路徑,防止重復啟動nginx
--http-client-body-temp-path=/var/cache/nginx/client_temp
快取
--http-proxy-temp-path=/var/cache/nginx/proxy_temp
代理快取
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp
php快取
--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp
python快取
--http-scgi-temp-path=/var/cache/nginx/scgi_temp
--with-compat
啟用動態模塊兼容性
--user=nginx
用戶
--group=nginx
組
2、模塊類
--with-file-aio
使用nginx的aio特性會大大提高性能,比如圖片站的特點是大量的讀io操作,nginx aio不用等待每次io的結果,有助于并發處理大量io和提高nginx處理效率,
aio的優點就是能夠同時提交多個io請求給內核,然后直接由內核的io調度演算法去處理這些請求(directio),這樣的話,內核就有可能執行一些合并,節約了讀取檔案的處理時間,
就是異步非阻塞
--with-threads
多執行緒模塊
--with-http_addition_module
回應之前或者之后追加文本內容,比如想在站點底部追加一個js廣告或者新增的css樣式
--with-http_dav_module
增加上傳PUT,DELETE,MKCOL:創建集合,COPY和MOVE方法)默認情況下為關閉
--with-http_flv_module
NGINX 添加MP4、FLV視頻支持模塊
--with-http_gunzip_module
壓縮模塊
--with-http_gzip_static_module
--with-http_mp4_module
多媒體模塊
--with-http_random_index_module
nginx顯示隨機首頁模塊
--with-http_realip_module
Nginx獲取真實IP模塊
--with-http_secure_link_module
nginx安全下載模塊
--with-http_slice_module
nginx中文檔案
--with-http_ssl_module
安全模塊
--with-http_stub_status_module
訪問狀態
--with-http_sub_module
nginx替換網站回應內容
--with-http_v2_module
--with-mail
郵件客戶端--with-mail_ssl_module
--with-stream
負載均衡模塊,nginx從1.9.0開始,新增加了一個stream模塊,用來實作四層協議的轉發、代理或者負載均衡等,
--with-stream_realip_module
--with-stream_ssl_module
--with-stream_ssl_preread_module
--with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --
param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC'
--with-ld-opt='-Wl,-z,relro -Wl,-z,now -pie'
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/60765.html
標籤:其他
