server {
    listen              80;
    listen              [::]:80;
    server_name         www.shore.co.il;
    include             snippets/robots-allow-all.conf;
    include             snippets/ads-txt.conf;
    include             snippets/security-txt.conf;
    location = /        { return 301 https://$host/blog/; }
    location /repo/     {
        root            /var/www/www.shore.co.il/;
        autoindex       on;
    }
    location /          { return 301 https://$host$request_uri; }
}

server {
    listen                  443 ssl;
    listen                  [::]:443 ssl;
    server_name             www.shore.co.il;
    include                 snippets/robots-allow-all.conf;
    include                 snippets/ads-txt.conf;
    include                 snippets/security-txt.conf;
    include                 snippets/ssl.conf;
    root                    /var/www/www.shore.co.il/;
    error_page 404          /;

    location /repo/         { autoindex on; }
    location = /resume      { try_files $uri /resume/resume.html; }
    location = /resume/     { index resume.html; }

    location = /            { return 301 https://$host/blog/; }
    location /about         { return 301 https://$host/blog/pages/about-me.html; }
    location /spam          { return 301 https://$host/blog/pages/spam.html; }
    location = /blog        {
        try_files $uri /blog/index.html;
        charset UTF-8;
    }

    location /cgit          { return 301 https://git.shore.co.il/explore; }
    location /cgit/         { return 301 https://git.shore.co.il/explore; }
    location /git           { return 301 https://git.shore.co.il/explore; }
    location /git/          { return 301 https://git.shore.co.il/explore; }
}
