#
# HTTPS server configuration
#

server {
    listen       443 ssl http2 default_server;
    listen       [::]:443 ssl;
    server_name  _;
    root         /usr/share/nginx/html;

    ssl_certificate /etc/nginx/ssl_cert/Wildcard.renaultsamsungm.com.chain.crt;
    ssl_certificate_key /etc/nginx/ssl_cert/Wildcard.renaultsamsungm.com.key;
    ssl_session_cache shared:SSL:1m;
    ssl_session_timeout  10m;
    ssl_ciphers HIGH:!aNULL:!MD5;
    ssl_prefer_server_ciphers on;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE


    location / {
    }

    error_page 404 /404.html;
        location = /40x.html {
    }

    error_page 500 502 503 504 /50x.html;
        location = /50x.html {
    }
}


server {
    listen       443 ssl http2;
    listen       [::]:443 ssl;

    server_name  www.lotteglogis.com opensourcelab.co.kr;

    root         /usr/share/nginx/html;

    ssl_certificate /etc/nginx/ssl_cert/Wildcard.renaultsamsungm.com.chain.crt;
    ssl_certificate_key /etc/nginx/ssl_cert/Wildcard.renaultsamsungm.com.key;
    ssl_session_cache shared:SSL:1m;
    ssl_session_timeout  10m;
    ssl_ciphers HIGH:!aNULL:!MD5;
    ssl_prefer_server_ciphers on;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE

    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-Server $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Permitted-Cross-Domain-Policies all;

    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";


    location / {
	proxy_pass https://124.243.74.18;
#	proxy_pass https://www.lotteglogis.com;
    }

    error_page 404 /404.html;
        location = /40x.html {
    }

    error_page 500 502 503 504 /50x.html;
        location = /50x.html {
    }
}
