SSL Termination Ubuntu Nginx

Pertama install terlebih dahulu nginx
# apt-get install nginx
# update-rc.d nginx defaults

Generate key
# apt-get install mod_ssl openssl
# openssl genrsa -des3 -out 4096
# openssl req -new -key -out

Kemudian beli SSL dari file csr tersebut. Pasang ke nginx
# cat domain_com.crt > ssl-bundle.crt
# vi /etc/nginx/site-enable/default

server {
        listen 443 ssl;

ssl on;
ssl_certificate /ssl/folder/;
ssl_certificate_key /ssl/folder/;
ssl_prefer_server_ciphers on;

## OCSP Stapling
ssl_stapling on;
ssl_stapling_verify on;
ssl_trusted_certificate /ssl/folder/;

        location / {
            proxy_set_header X-Real-IP  $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto https;
            proxy_set_header X-Forwarded-Port 443;
            proxy_set_header Host $host;

Reload nginx
# service nginx reload
# service nginx start
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


Post a Comment