server {
    listen       80;
    listen  [::]:80;
    server_name  blogs.gaga.plus;

    rewrite ^(.*) https://$server_name$1 permanent;
}

server {
    listen       443 ssl;
    server_name  api.gaga.plus;

    ssl_certificate      /etc/nginx/ssl/blogs.gaga.plus.pem;
    ssl_certificate_key  /etc/nginx/ssl/blogs.gaga.plus.key;

    ssl_session_cache    shared:SSL:1m;
    ssl_session_timeout  5m;

    ssl_ciphers  HIGH:!aNULL:!MD5;
    ssl_prefer_server_ciphers  on;

    location / {
         root /usr/share/nginx/html;
         index index.html;
    }

    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }
}