33 lines
1.1 KiB
Nginx Configuration File
33 lines
1.1 KiB
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name forum.tilde.team;
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl; # managed by Certbot
|
|
server_name forum.tilde.team;
|
|
|
|
location / {
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header Host $http_host;
|
|
proxy_redirect off;
|
|
proxy_pass http://localhost:4001;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
}
|
|
|
|
location ~* ^.+\.(css|cur|gif|gz|ico|jpg|jpeg|js|png|svg|woff|woff2)$ {
|
|
root /home/ben/workspace/forum/priv/static;
|
|
etag off;
|
|
expires max;
|
|
add_header Cache-Control public;
|
|
}
|
|
|
|
ssl_certificate /etc/letsencrypt/live/forum.tilde.team/fullchain.pem; # managed by Certbot
|
|
ssl_certificate_key /etc/letsencrypt/live/forum.tilde.team/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
|
|
}
|