let-s-encrypt
                Toto je starší verze dokumentu!
Let’s Encrypt
Let’s Encrypt is a new Certificate Authority:
It’s free, automated, and open. 
Instalace ACME
Přidat uživatele
shell# adduser letsencrypt
Nainstalovat GIT
shell# yum install git.x86_64
Instalace
shell# su - letsencrypt shell$ git clone https://github.com/Neilpang/acme.sh.git shell$ cd ./acme.sh shell$ ./acme.sh --install
Oprávnění uživatele letsencrypt pro reload httpd.service
shell# visudo letsencrypt ALL=NOPASSWD:/bin/systemctl reload httpd.service
Nový certifikát
Příklad vystavení cerifikátu
shell# .acme.sh/acme.sh --issue -d example.com -d www.example.com -w /data/www/example.com/www-le/ --reloadcmd "sudo systemctl reload httpd.service"
HTTP secure
# example.com
<VirtualHost *:80>
  ServerName example.com
  ServerAlias www.example.com
  RewriteEngine On
  RewriteRule ^/(.*) https://www.example.com/$1 [L,R=301]
</VirtualHost>
 
<VirtualHost *:443>
  ServerName example.com
  RewriteEngine On
  RewriteRule ^/(.*) https://www.example.com/$1 [L,R=301]
  SSLEngine on
  SSLProtocol All -SSLv2 -SSLv3
  SSLHonorCipherOrder on
  SSLCipherSuite ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4
  SSLCompression Off
  Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
  Header always set X-Frame-Options DENY
  SSLCertificateFile /home/letsencrypt/.acme.sh/example.com/example.com.cer
  SSLCertificateKeyFile /home/letsencrypt/.acme.sh/example.com/example.com.key
  SSLCACertificateFile /home/letsencrypt/.acme.sh/example.com/fullchain.cer
</VirtualHost>
 
<VirtualHost *:443>
  ServerName www.example.com
  DocumentRoot /data/www/example.com/www
  ServerAdmin blazek@example.com
  SSLEngine on
  SSLProtocol All -SSLv2 -SSLv3
  SSLHonorCipherOrder on
  SSLCipherSuite ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4
  SSLCompression Off
  Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
  Header always set X-Frame-Options DENY
  SSLCertificateFile /home/letsencrypt/.acme.sh/example.com/example.com.cer
  SSLCertificateKeyFile /home/letsencrypt/.acme.sh/example.com/example.com.key
  SSLCACertificateFile /home/letsencrypt/.acme.sh/example.com/fullchain.cer
  ErrorLog logs/example.com-error_log
  CustomLog logs/example.com-access_log common
  <Directory  "/data/www/example.com/www">
    AllowOverride All
    Require all granted
  </Directory>
  # let's encrypt
  Alias /.well-known/ /data/www/example.com/www-le/.well-known/
  <Directory /data/www/example.com/www-le/>
    AllowOverride None
    Require all granted
    Satisfy Any
  </Directory>
</VirtualHost>
let-s-encrypt.1480346830.txt.bz2 · Poslední úprava: 2023/12/26 19:13 (upraveno mimo DokuWiki)
                
                