IDC知識(shí)庫(kù)
IDC領(lǐng)域?qū)I(yè)知識(shí)百科平臺(tái)

CentOS安裝Nginx帶ssl證書配置

第一步,安裝依賴包。

yum install autoconf automake zlib zlib-devel openssl openssl-devel pcre pcre-devel gcc

第二步,進(jìn)入安裝目錄并下載并解壓,以opt目錄nginx1.161.1為例。

wget http://nginx.org/download/nginx-1.16.1.tar.gz
tar -zxvf nginx-1.16.1.tar.gz

第三步,安裝ssl。

yum -y install openssl openssl-devel

第四步,編譯安裝帶ssl的Nginx。

cd /opt/nginx-1.16.1
./configure --prefix=/opt/nginx --with-http_stub_status_module --with-http_ssl_module
make
make install

第五步,上傳ssl證書,配置nginx.conf。

最后,啟動(dòng)nginx。

cd /opt/nginx/sbin
./nginx

贊(1)
分享到: 更多 (0)

中國(guó)專業(yè)的網(wǎng)站域名及網(wǎng)站空間提供商

買域名買空間