Monday, April 25, 2016

installing ssl certificate/enabling https on apache,amazon linux with letsencrypt

yum install mod24_ssl openssl
cd letsencrypt/
./letsencrypt-auto --debug certonly --webroot -w /var/www/html/abc -d www.abc.com

Edit httpd.conf

<IfModule mod_ssl.c>
    Listen 443
</IfModule>

<VirtualHost *:443>
        SSLEngine on
        SSLCertificateFile /etc/letsencrypt/live/www.abc.com/cert.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/www.abc.com/privkey.pem
        SSLCertificateChainFile /etc/letsencrypt/live/www.abc.com/fullchain.pem
        <Directory "/var/www/html/abc">
                Options Indexes FollowSymLinks
                AllowOverride All
                Order allow,deny
                Allow from all
        </Directory>
        DocumentRoot "/var/www/html/abc"
        ServerName www.abc.com
</VirtualHost>

service httpd restart

No comments:

Blog Archive