server {
    listen *:80;
    server_name app.hotpocket.work.bthlabs.net;

    location / {
        # proxy_cache_bypass $http_upgrade;
        # proxy_set_header Connection close;
        # proxy_set_header Upgrade $http_upgrade;
        proxy_request_buffering off;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host app.hotpocket.work.bthlabs.net;
        proxy_http_version 1.1;
        proxy_pass http://10.100.100.101:8001/;
        # proxy_redirect off;
        add_header X-Upstream hotpocket-app always;
    }
}

server {
    listen *:443 ssl;
    server_name app.hotpocket.work.bthlabs.net;

    ssl_certificate /Users/bilbo/Projects/PLAYG/hotpocket/services/tls/app.hotpocket.work.bthlabs.net.crt;
    ssl_certificate_key /Users/bilbo/Projects/PLAYG/hotpocket/services/tls/app.hotpocket.work.bthlabs.net.key;

    location / {
        # proxy_cache_bypass $http_upgrade;
        # proxy_set_header Connection close;
        # proxy_set_header Upgrade $http_upgrade;
        proxy_request_buffering off;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host app.hotpocket.work.bthlabs.net;
        proxy_http_version 1.1;
        proxy_pass http://10.100.100.101:8001/;
        # proxy_redirect off;
        add_header X-Upstream hotpocket-app always;
    }
}

server {
    listen *:80;
    server_name admin.hotpocket.work.bthlabs.net;

    location / {
        # proxy_cache_bypass $http_upgrade;
        # proxy_set_header Connection close;
        # proxy_set_header Upgrade $http_upgrade;
        proxy_request_buffering off;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host admin.hotpocket.work.bthlabs.net;
        proxy_http_version 1.1;
        proxy_pass http://10.100.100.101:8002/;
        # proxy_redirect off;
        add_header X-Upstream hotpocket-admin always;
    }
}

server {
    listen *:443 ssl;
    server_name admin.hotpocket.work.bthlabs.net;

    ssl_certificate /Users/bilbo/Projects/PLAYG/hotpocket/services/tls/app.hotpocket.work.bthlabs.net.crt;
    ssl_certificate_key /Users/bilbo/Projects/PLAYG/hotpocket/services/tls/app.hotpocket.work.bthlabs.net.key;

    location / {
        # proxy_cache_bypass $http_upgrade;
        # proxy_set_header Connection close;
        # proxy_set_header Upgrade $http_upgrade;
        proxy_request_buffering off;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host admin.hotpocket.work.bthlabs.net;
        proxy_http_version 1.1;
        proxy_pass http://10.100.100.101:8002/;
        # proxy_redirect off;
        add_header X-Upstream hotpocket-admin always;
    }
}
