Nginx安裝配置引數
阿新 • • 發佈:2018-11-12
Nginx安裝配置引數
編譯引數可能會根據版本的不同進行變化,./configure --help 檢視編譯引數列表,常見的選項如下:
--prefix = <path> | 安裝路徑,如果沒有指定,預設為在/ usr /本地/ nginx的 |
--sbin-path = <path> | nginx可執行命令的檔案,如果沒有指定,預設為<prefix> ./ sbin目錄/ nginx的conf路徑= <路徑> - 在沒有使用-c引數指定的情況下nginx.conf的預設位置,如果沒有指定,預設為<字首> /conf/nginx.conf。 |
--pid-path = <path> | nginx.pid的路徑,如果沒有在nginx.conf中通過“pid”指令指定,預設為<prefix> /logs/nginx.pid |
--lock-path = <path> | nginx.lock檔案路徑,如果沒有指定,預設為<prefix> /logs/nginx.lock |
--error-log-path = <path> | 當沒有在nginx.conf中使用“error_log”指令指定時的錯誤日誌位置,如果沒有指定,預設為<字首> /logs/error.log.--http-log-path = <path> - 當沒有在nginx.conf中使用“access_log”指令指定時的訪問日誌位置,如果沒有指定,預設為<字首> /logs/access.log。 |
--user = <user> | 當沒有在nginx.conf中使用“使用者”指令指定時的nginx執行的使用者,如果沒有指定,預設為“任何人” |
--group = <group> | 當沒有在nginx.conf中使用“user”指令指定時nginx執行的組,如果沒有指定,預設為“nobody” |
--builddir = DIR | 設定構建目錄 |
--with-rtsig_module | 啟用rtsig模組。 |
--with-select_module -without-select_module | 如果在configure的時候沒有發現kqueue,epoll,rtsig或/ dev / poll其中之一,選擇模組始終為啟用狀態。 |
--with-poll_module -without-poll_module | 如果在configure的時候沒有發現kqueue,epoll,rtsig或/ dev / poll其中之一,poll模組始終為啟用狀態。 |
--with-http_ssl_module | 啟用ngx_http_ssl_module,啟用SSL支援並且能夠處理HTTPS請求。需要的OpenSSL,在Debian的系統中,對應的包為的中的libssl-dev的的。 |
--with-http_realip_module | 啟用ngx_http_realip_module |
--with-http_addition_module | 啟用ngx_http_addition_module |
--with-http_sub_module | 啟用ngx_http_sub_module |
--with-http_dav_module | 啟用ngx_http_dav_module |
--with-http_flv_module | 啟用ngx_http_flv_module |
--with-http_stub_status_module | 啟用“伺服器狀態”(服務狀態)頁面 |
--with-http_perl_module | 啟用ngx_http_perl_module |
--without-http_charset_module | 禁用ngx_http_charset_module |
--without-http_gzip_module | 禁用ngx_http_gzip_module,如果啟用,需要zlib的包。 |
--without-http_ssi_module | 禁用ngx_http_ssi_module |
--without-http_userid_module | 禁用ngx_http_userid_module |
--without-http_access_module | 禁用ngx_http_access_module |
--without-http_auth_basic_module | 禁用ngx_http_auth_basic_module |
--without-http_autoindex_module | 禁用ngx_http_autoindex_module |
--without-http_geo_module | 禁用ngx_http_geo_module |
--without-http_map_module | 禁用ngx_http_map_module |
--without-http_referer_module | 禁用ngx_http_referer_module |
--without-http_rewrite_module | 禁用ngx_http_rewrite_module如果啟用,需要PCRE包.-沒有-http_proxy_module - 禁用ngx_http_proxy_module |
--without-http_fastcgi_module | 禁用ngx_http_fastcgi_module |
--without-http_memcached_module | 禁用ngx_http_memcached_module |
--without-http_limit_zone_module | 禁用ngx_http_limit_zone_module |
--without-http_empty_gif_module | 禁用ngx_http_empty_gif_module |
--without-http_browser_module | 禁用ngx_http_browser_module |
--without-http_upstream_ip_hash_module | 禁用ngx_http_upstream_ip_hash_module |
--with-perl_modules_path = PATH | 為perl的模組設定路徑 |
--with-perl = PATH | 為perl的庫設定路徑 |
--http-client-body-temp-path = PATH | 為http連線的請求實體臨時檔案設定路徑,如果沒有指定,預設為<prefix> / client_body_temp |
--http-proxy-temp-path = PATH | 為http代理臨時檔案設定路徑,如果沒有指定,預設為<prefix> / proxy_temp |
--http-fastcgi-temp-path = PATH | 為http fastcgi臨時檔案設定路徑,如果沒有指定,預設為<prefix> / fastcgi_temp |
--without-HTTP | 禁用HTTP服務 |
--with郵件 | 啟用IMAP4 / POP3 / SMTP代理模組 |
--with-mail_ssl_module | 啟用ngx_mail_ssl_module |
--with-cc = PATH | 設定Ç編譯器路徑 |
--with-cpp = PATH | 設定Ç前處理器路徑 |
--with-cc-opt = OPTIONS | 變數CFLAGS中附加的引數,用於FreeBSD中的PCRE庫,同樣需要指定-withcc-opt =“ - I / usr / local / include”,如果我們使用select()函式則需要同時增加檔案描述符數量,可以通過-with-cc-opt =“ - D FD_SETSIZE = 2048”指定 |
--with-ld-opt = OPTIONS | 通過聯結器的附加引數,用於FreeBSD中的PCRE庫,同樣需要指定-withld-opt =“ - L / usr / local / lib”。 |
--with-cpu-opt = CPU | 指定編譯的CPU,可用的值為:奔騰,pentiumpro,pentium3,Pentium4的,的Athlon,皓,AMD64,不再獲得,SPARC64,PPC64 |
--without-PCRE | 禁用PCRE庫檔案,同時將禁用HTTP重寫模組,如果要在“位置”指令中使用正則表示式,同樣需要PCRE庫。 |
--with-pcre = DIR | 設定PCRE庫原始檔路徑 |
--with-pcre-opt = OPTIONS | 在編譯時為PCRE設定附加引數 |
--with-md5 = DIR | 設定MD5庫原始檔路徑 |
--with-md5-opt = OPTIONS | 在編譯時為MD5設定附加引數 |
--with-MD5-ASM | 使用MD5彙編源 |
--with-sha1 = DIR | 設定SHA1庫原始檔路徑 |
--with-sha1-opt = OPTIONS | 在編譯時為SHA1設定附加引數。 |
--with-SHA1-ASM | 使用SHA1彙編源 |
--with-zlib = DIR | 設定的zlib庫原始檔路徑 |
--with-zlib-opt = OPTIONS | 在編譯時為zlib的設定附加引數 |
--with-zlib-asm = CPU | 為指定的CPU使用zlib的彙編源進行優化,可用值為:奔騰,pentiumpro。 |
--with-openssl = DIR | 設定openssl庫原始檔路徑。 |
--with-openssl-opt = OPTIONS | 在編譯時為OpenSSL的設定附加引數 |
--with除錯 | 啟用除錯記錄 |
--add-module = PATH | 增加一個在PATH中的第三方模組。 |