server {
    listen       80;
    server_name  localhost;

    index index.html;

    location / {
        root   /home/ubuntu/project-source/company/entry;
    }
}

server {
    server_name test24.company.io www.test24.company.io;

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/test24.company.io/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/test24.company.io/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 = test24.company.io) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    listen      80;
    server_name test24.company.io www.test24.company.io;
    return 404; # managed by Certbot
}