server {
    listen 443 ssl;

    ssl_certificate "/etc/nginx/conf.d/server.crt";
    ssl_certificate_key "/etc/nginx/conf.d/server.key";

    access_log  /var/log/nginx/ot.access.log  main;
    error_log /var/log/nginx/ot.error.log notice;

    server_name olivetin.example.com;

    location / {
        proxy_pass http://localhost:1337/;
        proxy_redirect http://localhost:1337/ http://localhost/OliveTin/;
    }

    location /websocket {
        proxy_set_header Upgrade "websocket";
        proxy_set_header Connection "upgrade";
        proxy_pass http://localhost:1337/websocket;
        proxy_read_timeout 600s;
        proxy_send_timeout 600s;
    }
}

