I have followed some tutorials that teaches to implement ssl but most of them are not working for some reason, http works fine tho, don't know what I'm missing This is my default config, It looks like I have something wrong on my default config because I can create an httpServer in my backend.
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/metroville/{{domain}}/build;
index index.html index.htm index.nginx-debian.html;
server_name {{domain}};
listen [::]:443 ssl ipv6only=on;
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/{{domain}}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{domain}}/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
location / {
try_files $uri /index.html;
}
location /api/ {
proxy_pass http://localhost:5000;
}
}