Can someone help me creating NGINX with https

I created a NGINX docker service running on Windows. With Ports 80:80 it works fine until i wanted to introduce HTTPS. It seems like NGINX does not even recognize if a request comes in. (yes firewall settings allow traffic on port 443).

I do have a PFX file, i extracted a crt and rsa file.

this is my nginx conf.

worker_processes  1;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    server_names_hash_bucket_size 64;
    client_max_body_size 0;
    sendfile on;
    types_hash_max_size 2048;
    large_client_header_buffers 4 16k;
    keepalive_timeout 36000;
    proxy_connect_timeout 36000;
    proxy_send_timeout 36000;
    proxy_read_timeout 36000;
    send_timeout 36000;

    #Load HTTPS site configurations
    include ../httpssites/*.conf;
}

this is my conf. for each service

server {
    listen       443 ssl;
    ssl_certificate /certs/xx.crt;
    ssl_certificate_key /certs/xx/domain.rsa;
    server_name  xx-14488.dev.xx.com;

    location / {
        proxy_pass http://xx-14488.dev.xx.com;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

upstream xx-14488.dev.xx.com {
    server swarm.xx.com:30249;
}

Did you also add the port mapping for 443 to the dockerfile? Is there anything in the nginx error log? When you say NGINX doesn’t recognize the request, does it just time out if you try to hit the nginx container on 443?

Part of the issue is most likely that NGINX expects the certificate key to be a .pem format and not rsa. I am not personally familar with running NGINX on windows, so I am less helpful when it comes to troubleshooting in a windows env. Have you tried running it inside a linux container instead? You can pull the official NGINX container images from dockerhub to simplify the deployment process.