diff --git a/sites-available/asxp.io b/sites-available/asxp.io index 01fe62d..a4f91f8 100644 --- a/sites-available/asxp.io +++ b/sites-available/asxp.io @@ -24,4 +24,23 @@ server { ssl_certificate_key /etc/letsencrypt/live/asxp.io/privkey.pem; include /etc/letsencrypt/options-ssl-nginx.conf; ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; -} \ No newline at end of file +} + +server { + + listen 80; + listen [::]:80; + server_name asxp.io www.asxp.io; + + if ($host = http://$host$request_uri) { + return 301 https://$host$request_uri; + } + + if ($host = http://www.$host$request_uri) { + return 301 https://$host$request_uri; + } + + location / { + try_files $uri $uri/ =404; + } +} \ No newline at end of file