server { listen 80; listen [::]:80; location /.well-known/acme-challenge/ { root /var/www/certbot/; } location / { return 301 https://schoolproj.fakeowl1.com$request_uri; } } server { listen 443 ssl; listen [::]:443 ssl; server_name schoolproj.fakeowl1.com; root /var/www/myschoolproj; ssl_certificate /etc/letsencrypt/live/schoolproj.fakeowl1.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/schoolproj.fakeowl1.com/privkey.pem; location = / { try_files /index.html =404; } location = /index { return 404; } }