User Tools

Site Tools


letsencrypt

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
letsencrypt [2018/09/20 18:50]
k2patel [configuration for certificate request / location]
letsencrypt [2018/09/25 14:38]
k2patel [Nginx configuration]
Line 56: Line 56:
 </​code>​ </​code>​
  
 +
 +SSL Configuration
 +<code conf ssl.conf>​
 +    ssl on;
 +    ssl_certificate_key /​etc/​letsencrypt/​live/​fqdn.testdomain.com/​privkey.pem;​
 +    ssl_certificate /​etc/​letsencrypt/​live/​fqdn.testdomain.com/​fullchain.pem;​
 +    ssl_trusted_certificate /​etc/​letsencrypt/​live/​fqdn.testdomain.com/​fullchain.pem;​
 +</​code>​
 +==== Apache Configuration ====
 +So each domain only need to redirect to HTTPS if URL requested is from acme.
 +
 +<code conf domain.conf>​
 +        RewriteEngine On
 +        RewriteCond %{REQUEST_URI} !^/​.well-known/​acme-challenge [NC]
 +        RewriteCond %{HTTPS} off
 +        RewriteRule ^(.*)$ https://​%{HTTP_HOST}%{REQUEST_URI} [L,R=302]
 +</​code>​
 +
 +
 +SSL configuration
 +<code conf ssl.conf>​
 +        SSLEngine on
 +        SSLCertificateFile ​     "/​etc/​letsencrypt/​live/​fqdn.testdomain.com/​cert.pem"​
 +        SSLCertificateKeyFile ​  "/​etc/​letsencrypt/​live/​fqdn.testdomain.com/​privkey.pem"​
 +        SSLCACertificatePath ​   "/​etc/​letsencrypt/​live/​fqdn.testdomain.com/"​
 +        SSLCertificateChainFile "/​etc/​letsencrypt/​live/​fqdn.testdomain.com/​fullchain.pem"​
 +</​code>​
 ==== Cron setup ==== ==== Cron setup ====
 Now i have script which run every 11 week. Now i have script which run every 11 week.
letsencrypt.txt ยท Last modified: 2020/08/10 02:35 (external edit)