Note: This post describes the 2014 version of the site. It has since been rebuilt with Astro.

Source

All source code related to this website can be found at https://github.com/kaiwalya/kom. You can clone this repository using using the following commandโ€ฆ

git clone https://github.com/kaiwalya/kom.git

Basic Overview

  1. HTML/Javascript/CSS code is managed using Jekyll.

  2. The pages generated by Jekyll are served using a custom nodejs service built on top of express

  3. This nodejs service is hosted at https://kaiwalya-web.azurewebsites.net/ using Azure Websites which provides free hosting.

  4. In addition to that there is an Azure VM which uses Nginx as a reverse proxy to proxy traffic coming to kaiwalya.com to the Azure website. The SSL encryption certificates have been issued for free by Start SSL

  5. Finally Route 53 takes care of the DNS.

Some helpful nginx configuration options used in this deployment

Redirect http to https

server {
    listen 80;
    server_name kaiwalya.com;
    return       301 https://kaiwalya.com$request_uri;
}

Redirect the โ€œwwwโ€ subdomain requests to the parent domain

server {
    listen 443 ssl;
    server_name www.kaiwalya.com;
    ssl_certificate private/cert.pem;
    ssl_certificate_key private/key.pem;

    ssl_session_timeout 5m;

    ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES";
    ssl_prefer_server_ciphers on;

    return       301 https://kaiwalya.com$request_uri;
}

SSL Configuration and Reverse proxy

server {
    listen 443 ssl;
    server_name kaiwalya.com;
    ssl_certificate private/cert.pem;
    ssl_certificate_key private/key.pem;

    ssl_session_timeout 5m;

    ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES";
    ssl_prefer_server_ciphers on;

    location / {
        proxy_pass https://kaiwalya-web.azurewebsites.net:443;
    }
}