Install SSL Gratis dari letsencrypt

Salah satu organisasi yang memberikan SSL secara bebas adalah letsencript, caranya sangat mudah tinggal install :
sudo apt-get install letsencrypt
Kemudian untuk melakukan generate ssl gunakan perintah :
sudo letsencrypt certonly --webroot -w /var/www/html -d www.tukang.review
dan jangan lupa senantiasa lakunak pembaharuan sebelum masa habis di cronjob:
sudo letsencrypt renew --dry-run --agree-tos
Kemudian setting di nginx sebagai berikut :
server {
        listen 443 ssl;
       root /var/www/apps/doc/public;
        index index.php index.html index.htm index.nginx-debian.html;
        server_name menu.halaman.download;
        ssl_certificate /etc/letsencrypt/archive/www.halaman.download/fullchain1.pem;
        ssl_certificate_key /etc/letsencrypt/archive/www.halaman.download/privkey1.pem;
        location / {
                try_files $uri $uri/ /index.php?_url=$uri&$args;
        }
        location ~ \.php$ {
                fastcgi_pass unix:/run/php/php7.0-fpm.sock;
                fastcgi_index /index.php;
        include fastcgi_params;
        fastcgi_split_path_info       ^(.+\.php)(/.+)$;
        fastcgi_param PATH_INFO       $fastcgi_path_info;
        fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        }
        location ~ /\.ht {
                deny all;
        }
}

Share on Google Plus

About Rolly Maulana Awangga

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment