nginx 加入SSL的筆記

server {
  listen 80 default_server;

  # 加入 SSL 設定
  listen 443 ssl default_server;

  # 憑證與金鑰的路徑
  ssl_certificate /etc/nginx/ssl/nginx.crt;
  ssl_certificate_key /etc/nginx/ssl/nginx.key;

https://blog.gtwang.org/linux/nginx-create-and-install-ssl-certificate-on-ubuntu-linux/


dhparams.pem

ssl_dhparam /etc/nginx/ssl/dhparams.pem;

openssl dhparam -out dhparams.pem 2048
sudo chown www-data:www-data dhparams.pem
sudo chmod 400 dhparams.pem

mv to /etc/nginx/ssl/

https://www.peterdavehello.org/2015/10/build-an-a-plus-best-practice-https-web-server-via-nginx-chinese-version/

出現錯誤訊息
failed (SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch

openssl x509  -in mydomain.crt -modulus
openssl rsa  -in qa.server.key  -modulus


~$ ls /etc/nginx/ssl/
dhparams.pem       private.key        t_ca_bundle.crt    t_certificate.crt  t_private.key

https://serverfault.com/questions/571149/problems-installing-ssl-certificate-on-nginx-with-intermediate-key

 settings.php file.
 $conf['advagg_skip_404_check'] = TRUE;
https://drupal.stackexchange.com/questions/126247/advagg-and-nginx

留言

熱門文章