server {
  
    server_name   discord.libsoc.org;

    root          /home/server/libsoc/Server/public/;

    add_header alt-svc 'h3=":443"; ma=2592000, h3-23=":443"; ma=86400, h3-29=":443"; ma=2592000';
    add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";

    location / {
        return 301 https://discord.com/channels/1114280699755778110/;
    }

    location /invite {
        return 301 https://discord.gg/xAPZmyr8B6;
    }
        
    listen 443 http3;
    listen 443 ssl http2;
    ssl_certificate /etc/letsencrypt/live/libsoc.org/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/libsoc.org/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

    ssl_buffer_size 4k;
    ssl_stapling on;
    ssl_stapling_verify on;
    ssl_trusted_certificate /etc/letsencrypt/live/libsoc.org/fullchain.pem;

    resolver 1.1.1.1 1.0.0.1 valid=300s;
    resolver_timeout 5s;
} 

server {
  return 301 https://discord.libsoc.org$request_uri;

  listen 80;
  listen [::]:80;

  server_name   discord.libsoc.org;
}