server {
    server_name vscode-live-themes.ekinertac.com;  # Change to your domain or IP address

    root /home/deployer/vscode-live-themes/server;  # Change to the directory you want to serve
    autoindex on;                                   # Enable autoindexing
    autoindex_exact_size off;                       # Optional: show human-readable file sizes
    autoindex_localtime off;                        # Optional: show local time in listings

    location / {
        try_files $uri $uri/ =404;
    }

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/vscode-live-themes.ekinertac.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/vscode-live-themes.ekinertac.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}

server {
    if ($host = vscode-live-themes.ekinertac.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    listen 80;
    server_name vscode-live-themes.ekinertac.com;
    return 404; # managed by Certbot

}