적용 예제 1.

server {
    listen 443;
    server_name 도메인주소

    ssl on;
    ssl_certificate     /xxx/xxx/cert.pem;
    ssl_certificate_key /xxx/xxx/cert.key;

    location / {
        root path
    }
}

 

적용 예제 2.

server {
    listen               포트번호 ssl;
    server_name          localhost;
    ssl                  on;
    ssl_certificate      /xxx/xxx/cert.pem;
    ssl_certificate_key  /xxx/xxx/cert.key;
    ssl_session_timeout  5m;
    ssl_protocols        SSLv2 SSLv3 TLSv1;
    ssl_ciphers          HIGH:!aNULL:!MD5;
    ssl_prefer_server_ciphers   on;
    location / {
        proxy_pass       http://backend;
        index index.html test.jsp;
    }
}

 

적용 예제 3.

server {
    listen               443;

    ssl                  on;
    ssl_certificate      /xxx/xxxl/your_domain_name.pem; (or bundle.crt)
    ssl_certificate_key  /xxx/xxx//your_domain_name.key;

    server_name          your.domain.com;
    access_log           /var/log/nginx/nginx.vhost.access.log;
    error_log            /var/log/nginx/nginx.vhost.error.log;
    location / {
        root             /home/www/public_html/your.domain.com/public/;
        index            index.html;
} }