TLS/SSL

centos 6 apache ssl setting

編輯/etc/httpd/conf.d/ssl.conf

    Listen 443 
    <VirtualHost _default_:443>
      # General setup for the virtual host, inherited from global configuration
      #DocumentRoot "/var/www/html"
      #ServerName www.example.com:443
      DocumentRoot "/var/www/受保護的目錄"
      ServerName *:443 
      # SSL Engine Switch:
      # Enable/Disable SSL for this virtual host. 
      SSLEngine on 
      # SSL Cipher Suite:

2018 latest for letscript

Auto renew for all

cd /usr/share/letsencrypt

./certbot-auto renew

-----------------------------------

add new domain

cd /usr/share/letsencrypt

./letsencrypt-auto --apache -d greencom.com.tw -d www.greencom.com.tw

add subdomain

add drupal 6 or 7 securepage modules

https://www.drupal.org/project/securepages

Letsencrypt (for WordPress sites)

<VirtualHost *:80>
        ServerName yourdomainhere.com
        ServerAdmin me@yourdomainherec.om
        DocumentRoot /var/www/html
        
        Redirect permanent / https://yourdomainhere.com/
</VirtualHost>

<VirtualHost *:443>
        ServerName yourdomainhere.com
        ServerAdmin me@yourdomainhere.com
        DocumentRoot /var/www/html
        
        ErrorLog ${APACHE_LOG_DIR}/yourdomainhere.com-error.log
        CustomLog ${APACHE_LOG_DIR}/yourdomainhere.com-access.log combined
        
        SSLEngine On
        SSLCertificateFile /etc/letsencry

remove ssl

cd /usr/share/letsencrypt 

# ./certbot-auto delete --cert-name crm.greencom.tw

#certbot delete --cert-name MyDomain

#certbot delete --cert-name bking.tw

ssl for crm.greencom.tw

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/crm.greencom.tw/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/crm.greencom.tw/privkey.pem
   Your cert will expire on 2018-04-12. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot-auto
   again. To non-interactively renew *all* of your certificates, run
   "certbot-auto renew"
 

6:2018-01-23 for greencom.tw

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/www.greencom.tw/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/www.greencom.tw/privkey.pem
   Your cert will expire on 2018-04-12. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot-auto
   again. To non-interactively renew *all* of your certificates, run
   "certbot-auto renew"
 - If you like Certbot, please consider supporting our work by:

All letsencrypt

cd /usr/share/letsencrypt

service httpd stop

add drupal 6 or 7 securepage modules
 

  • Set $conf['https'] = TRUE; in settings.php.

[root@dns6 letsencrypt]# ./certbot-auto certonly --force-renew --cert-name greencom.tw
Saving debug log to /var/log/letsencrypt/letsencrypt.log