Nginx從搭建到配置支援HTTPS的方法

2021-09-19 06:58:54 字數 1032 閱讀 5968

基礎包

ububtuapt-get install build-essentialapt-get install libtoolcentosyum -y install gcc automake autoconf libtool makeyum install gcc gcc-c++

進入安裝目錄

cd /usr/local/src

安裝 pcre 支援正則表達 使 nginx 支援 rewrite 功能搜尋引擎大全

wget -zxvf pcre-8.42.tar.gzcd pcre-8.42./configuremakemake install

安裝 zlib 支援資料壓縮

wget -zxvf zlib-1.2.11.tar.gzcd zlib-1.2.11./configuremakemake install

安裝 openssl 支援 https

配置配置檔案位址

/usr/local/nginx/conf/nginx.conf

使用命令

/usr/local/nginx/sbin/nginx # 啟動 nginx/usr/local/nginx/sbin/nginx -t # 檢查 nginx 配置檔案正確性/usr/local/nginx/sbin/nginx -s reload # 重新載入配置檔案/usr/local/nginx/sbin/nginx -s reopen # 重啟 nginx/usr/local/nginx/sbin/nginx -s stop # 停止 nginx

程序關閉

Nginx從搭建到配置支援HTTPS

ububtu apt get install build essential apt get install libtoolcentos yum y install gcc automake autoconf libtool make yum install gcc gcc c 進入安裝目錄 cd ...

Nginx從搭建到配置支援HTTPS的方法

安裝 基礎包ububtu apt get install build essential apt get install libtool centos yum y install gcc automake autoconf libtool make yum install gcc gcc c 進入安...

nginx配置使用ssl模組配置支援HTTPS訪問

生成自簽名證書 1 伺服器上安裝mod ssl和openssl yum install mod ssl openssl 2 生成金鑰 openssl genrsa out cyz.com.key 2048 3.生成證書請求檔案,執行之後會出現一大堆要輸入的東西,輸入之後就生成.csr的檔案了 cou...