1
0
clubhaus-schornbach/Deployment/Live/nginx.conf

43 lines
1.2 KiB
Nginx Configuration File

upstream clubhaus_website {
server 127.0.0.1:12000;
}
server {
server_name clubhaus-schornbach.de;
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/clubhaus-schornbach.de/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/clubhaus-schornbach.de/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
location / {
proxy_pass http://127.0.0.1:12000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header HOST $host;
proxy_redirect off;
# allow uploads up to 20 megabytes (like pictures)
client_max_body_size 20M;
}
# redirect static files to filesystem
location /static/ {
alias /usr/projects/clubhaus/clubhaus/static/;
}
# redirect media files to filesystem (user uploaded files)
location /media/ {
alias /usr/projects/clubhaus/clubhaus/media/;
}
}
server {
if ($host = clubhaus-schornbach.de) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name clubhaus-schornbach.de;
listen 80;
return 404; # managed by Certbot
}