# events {
#     worker_connections 1024;
# }

# http {
#     upstream nodejs_backend {
#         server node-app:3000;
#     }

#     server {
#         listen 80;
#         server_name localhost;

#         location / {
#             proxy_pass http://nodejs_backend;
#             proxy_http_version 1.1;
#             proxy_set_header Upgrade $http_upgrade;
#             proxy_set_header Connection 'upgrade';
#             proxy_set_header Host $host;
#             proxy_cache_bypass $http_upgrade;
#             proxy_set_header X-Real-IP $remote_addr;
#             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#         }
#     }
# }


server {
    listen 80;
    listen [::]:80;
    server_name qa-tkbenefitsolutions.corenroll.com;
    return 301 https://$host$request_uri;

    # fastcgi_param HTTPS on;
    # root /var/www/plan/planmodule-ui/dist;
    # index index.html index.htm index.php;
}

server {
    listen 443 ssl;
    server_name qa-tkbenefitsolutions.corenroll.com;
    
    index index.html index.htm index.nginx-debian.html;

    ssl_certificate /etc/ssl/certs/f78cbe9009c22c37.crt;
    ssl_certificate_key /etc/ssl/private/corenroll.key;

    location / {
        root /usr/share/nginx/html;
        try_files $uri $uri/ /index.html =404;
    }

    location ~ /\.ht {
        deny all;
    }

    access_log /var/log/nginx/qa-tkbenefitsolutions.corenroll.com.access.log;
    error_log  /var/log/nginx/qa-tkbenefitsolutions.corenroll.com.error.log;
}

