removeddit/server-config/ssl
2017-11-12 01:24:24 +01:00

49 lines
No EOL
1 KiB
Text

server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
root /var/www/removeddit;
index index.html;
server_name removeddit.com www.removeddit.com;
access_log /var/log/nginx/removeddit/access.log;
error_log /var/log/nginx/removeddit/error.log;
# Uncomment these after you've received the certificates
#ssl_certificate /etc/letsencrypt/live/removeddit.com/fullchain.pem;
#ssl_certificate_key /etc/letsencrypt/live/removeddit.com/privkey.pem;
location ~* /r/[a-zA-Z0-9]+/[a-zA-Z0-9] {
try_files /thread.html /thread.html =404;
}
location /r/ {
try_files /subreddit.html /subreddit.html =404;
}
location /static/ {
try_files $uri $uri/ =404;
}
location /about/ {
try_files /about.html /about.html =404;
}
location / {
try_files /subreddit.html /subreddit.html =404;
}
}
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name removeddit.com www.removeddit.com;
location / {
return 301 https://$host$request_uri;
}
location ~ /.well-known {
allow all;
}
}