aboutsummaryrefslogtreecommitdiffstats
path: root/files/etc/nginx/sites-available
diff options
context:
space:
mode:
Diffstat (limited to 'files/etc/nginx/sites-available')
-rw-r--r--files/etc/nginx/sites-available/shione.net12
1 files changed, 9 insertions, 3 deletions
diff --git a/files/etc/nginx/sites-available/shione.net b/files/etc/nginx/sites-available/shione.net
index 28f7afe..078927b 100644
--- a/files/etc/nginx/sites-available/shione.net
+++ b/files/etc/nginx/sites-available/shione.net
@@ -20,14 +20,21 @@
#
# `fancyindex` is from `nginx-extras`.
server {
- listen 80 default_server;
- listen [::]:80 default_server;
+ listen 80 default_server;
+ listen [::]:80 default_server;
+ location / {
+ return 301 https://$host$request_uri;
+ }
+}
+
+server {
# SSL configuration
#
# Partially generated by https://ssl-config.mozilla.org/.
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
+
#
# Note: You should disable gzip for SSL traffic.
# See: https://bugs.debian.org/773332
@@ -43,7 +50,6 @@ server {
ssl_certificate /etc/letsencrypt/live/shione.net/fullchain.pem;
# managed by Certbot.
ssl_certificate_key /etc/letsencrypt/live/shione.net/privkey.pem;
- include /etc/letsencrypt/options-ssl-nginx.conf;
# OCSP stapling
ssl_stapling on;