소스 검색

fixed wrong letsencrypt certifcate replaced cert.pem by fullchain.pem

Bachir Soussi Chiadmi 6 년 전
부모
커밋
ec941fac00
3개의 변경된 파일2개의 추가작업 그리고 56개의 파일을 삭제
  1. 0 54
      assets/defaultssl.nginxconf
  2. 1 1
      assets/drupal-ssl.nginxconf
  3. 1 1
      assets/simple-phpfpm-ssl.nginxconf

+ 0 - 54
assets/defaultssl.nginxconf

@@ -1,54 +0,0 @@
-# https://www.howtoforge.com/tutorial/install-letsencrypt-and-secure-nginx-in-debian-9/
-# NOT USED
-server {
-  listen 443 ssl default_server;
-  listen [::]:443 ssl default_server;
-
-  server_name  www.yourdomain.com yourdomain.com;
-  #server_name _;
-
-  root /var/www/html;
-
-  access_log /var/log/nginx/access.log;
-  error_log /var/log/nginx/error.log;
-
-  #SSL Certificates
-  ssl_certificate "/etc/letsencrypt/live/www.yourdomain.com/cert.pem";
-  ssl_certificate_key "/etc/letsencrypt/live/www. yourdomain.com/privkey.pem";
-  ssl_dhparam /etc/nginx/dhparam.pem;
-  ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
-  #ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
-  ssl_session_cache shared:SSL:1m;
-  ssl_session_timeout 10m;
-  ssl_ciphers HIGH:!aNULL:!MD5;
-  ssl_prefer_server_ciphers  on;
-
-  add_header Strict-Transport-Security "max-age=31536000;
-  #includeSubDomains" always;
-
-  location / {
-    index index.php index.html index.htm;
-    try_files $uri $uri/ /index.php?$args $uri/ =404;
-  }
-
-  set $cache_uri $request_uri;
-
-  location ~ /.well-known {
-    allow all;
-  }
-
-  # pass PHP scripts to FastCGI server
-  location ~ \.php$ {
-    fastcgi_pass unix:/run/php/php7.0-fpm.sock;
-    fastcgi_index index.php;
-    include fastcgi_params;
-    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
-  }
-
-  # deny access to .htaccess files, if Apache's document root
-  # concurs with nginx's one
-  location ~ /\.ht {
-    deny all;
-  }
-
-}

+ 1 - 1
assets/drupal-ssl.nginxconf

@@ -16,7 +16,7 @@ server {
 
   #SSL Certificates
   ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
-  ssl_certificate "/etc/letsencrypt/live/DOMAIN.LTD/cert.pem";
+  ssl_certificate "/etc/letsencrypt/live/DOMAIN.LTD/fullchain.pem";
   ssl_certificate_key "/etc/letsencrypt/live/DOMAIN.LTD/privkey.pem";
   ssl_dhparam /etc/nginx/ssl/certs/DOMAIN.LTD/dhparam.pem;
   ssl_session_cache shared:SSL:1m;

+ 1 - 1
assets/simple-phpfpm-ssl.nginxconf

@@ -33,7 +33,7 @@ server {
 
   #SSL Certificates
   ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
-  ssl_certificate "/etc/letsencrypt/live/DOMAIN.LTD/cert.pem";
+  ssl_certificate "/etc/letsencrypt/live/DOMAIN.LTD/fullchain.pem";
   ssl_certificate_key "/etc/letsencrypt/live/DOMAIN.LTD/privkey.pem";
   ssl_dhparam /etc/nginx/ssl/certs/DOMAIN.LTD/dhparam.pem;
   ssl_session_cache shared:SSL:1m;