日日操夜夜添-日日操影院-日日草夜夜操-日日干干-精品一区二区三区波多野结衣-精品一区二区三区高清免费不卡

公告:魔扣目錄網(wǎng)為廣大站長提供免費收錄網(wǎng)站服務(wù),提交前請做好本站友鏈:【 網(wǎng)站目錄:http://www.ylptlb.cn 】, 免友鏈快審服務(wù)(50元/站),

點擊這里在線咨詢客服
新站提交
  • 網(wǎng)站:51998
  • 待審:31
  • 小程序:12
  • 文章:1030137
  • 會員:747

配置Nginx

1.下載證書文件

在Nginx服務(wù)器上安裝SSL證書

 

2.在nginx的conf目錄中創(chuàng)建目錄cert目錄,并將證書文件拷貝進去。

3.配置nginx.conf,完整的nginx.conf如下:

#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
 worker_connections 1024;
}
http {
 include mime.types;
 default_type Application/octet-stream;
 #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
 # '$status $body_bytes_sent "$http_referer" '
 # '"$http_user_agent" "$http_x_forwarded_for"';
 #access_log logs/access.log main;
 sendfile on;
 #tcp_nopush on;
 #keepalive_timeout 0;
 keepalive_timeout 65;
 #gzip on;
 server {
 listen 80;
 server_name xxx.com;#替換成你的域名
 location / {
 rewrite ^(.*)$ https://xxx.com/$1 permanent;#替換成你的域名
 }
 }
 server {
 listen 443;
 server_name xxx.com; # 替換成你的域名
 ssl on; #設(shè)置為on啟用SSL功能。
 root html;
 index index.html index.htm;
 ssl_certificate cert/2946730_www.xxx.com.pem; #替換成你的pem文件名稱
 ssl_certificate_key cert/2946730_www.xxx.com.key; #替換成你的key文件名稱
 ssl_session_timeout 5m;
 ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; #使用此加密套件。
 ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #使用該協(xié)議進行配置。
 ssl_prefer_server_ciphers on; 
 location / {
 proxy_pass http://localhost:8080/; #請求轉(zhuǎn)發(fā)
 }
 }
}

4.啟動nginx,然后進行訪問:

在Nginx服務(wù)器上安裝SSL證書

 

啟動時nginx:[emerg]unknown directive ssl錯誤

原因是nginx缺少SSL模塊,需要重新將SSL模塊添加進去,然后再啟動nginx:

  1. 解壓目錄(不是安裝目錄)執(zhí)行命令:./configure --with-http_ssl_module
  2. 繼續(xù)執(zhí)行命令:make
  3. 將objs目錄下的nginx文件復(fù)制到/usr/local/nginx/sbin/下覆蓋,然后重新啟動即可。

鏈接:https://www.cnblogs.com/seve/p/11692003.html

分享到:
標簽:證書 Nginx SSL
用戶無頭像

網(wǎng)友整理

注冊時間:

網(wǎng)站:5 個   小程序:0 個  文章:12 篇

  • 51998

    網(wǎng)站

  • 12

    小程序

  • 1030137

    文章

  • 747

    會員

趕快注冊賬號,推廣您的網(wǎng)站吧!
最新入駐小程序

數(shù)獨大挑戰(zhàn)2018-06-03

數(shù)獨一種數(shù)學(xué)游戲,玩家需要根據(jù)9

答題星2018-06-03

您可以通過答題星輕松地創(chuàng)建試卷

全階人生考試2018-06-03

各種考試題,題庫,初中,高中,大學(xué)四六

運動步數(shù)有氧達人2018-06-03

記錄運動步數(shù),積累氧氣值。還可偷

每日養(yǎng)生app2018-06-03

每日養(yǎng)生,天天健康

體育訓(xùn)練成績評定2018-06-03

通用課目體育訓(xùn)練成績評定