upstream app {
    server 127.0.0.1:3000;
}

server {
    listen 80 default;

    access_log <%= node.themis.basedir %>/logs/nginx_access.log;
    error_log <%= node.themis.basedir %>/logs/nginx_error.log;

    keepalive_timeout 100;
    charset utf-8;

    location / {
        root <%= node.themis.basedir %>/www;
        index index.html;
    }

    location /api/ {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_set_header X-NginX-Proxy true;

        proxy_pass http://app/;
        proxy_redirect off;

        proxy_http_version 1.1;
        chunked_transfer_encoding off;
        proxy_buffering off;
        proxy_cache off;
    }
}

upstream app {
    server 127.0.0.1:3000;
}

server {
    listen 80 default;

    access_log <%= node.themis.basedir %>/logs/nginx_access.log;
    error_log <%= node.themis.basedir %>/logs/nginx_error.log;

    keepalive_timeout 100;
    charset utf-8;

    location / {
        root <%= node.themis.basedir %>/www;
        rewrite ^(.*)$ /index.html break;
    }

    location /api/ {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_set_header X-NginX-Proxy true;

        proxy_pass http://app/;
        proxy_redirect off;

        proxy_http_version 1.1;
        chunked_transfer_encoding off;
        proxy_buffering off;
        proxy_cache off;
    }
}

Rewrite to one and only HTML file
Rewrite to one and only HTML file
