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

How would you like to authenticate with the ACME CA?
-------------------------------------------------------------------------------
1: Apache Web Server plugin - Beta (apache)
2: Spin up a temporary webserver (standalone)
3: Place files in webroot directory (webroot)
-------------------------------------------------------------------------------
Select the appropriate number [1-3] then [enter] (press 'c' to cancel): 2
Plugins selected: Authenticator standalone, Installer None
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for greencom.tw
http-01 challenge for www.greencom.tw
Waiting for verification...
Cleaning up challenges

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/greencom.tw/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/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:
 

Blog comments

RewriteCond %{HTTP_HOST} ^greencom\.tw$ [NC]
RewriteRule ^(.*)$ http://www.greencom.tw/$1 [R=301,L]  

add to greencom.tw

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

add to www.greencom.tw-le-ssl.conf

Header always set Strict-Transport-Security "max-age=0; includeSubdomains; preload"

1.add to httpd.conf

<IfModule mod_ssl.c>
#    Listen 443
    <IfModule !mod_authz_core.c>
        # Apache 2.2
        NameVirtualHost *:443
    </IfModule>
</IfModule>

2. nano www.greencom.com.tw-le-ssl.conf

<VirtualHost *:443>

Blog tags