46 lines
1.3 KiB
Plaintext
46 lines
1.3 KiB
Plaintext
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
server_name git.zinomedia.de;
|
|
|
|
access_log off;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/git.zinomedia.de/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/git.zinomedia.de/privkey.pem;
|
|
|
|
# SSL Optimizations
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_session_cache shared:SSL:10m;
|
|
ssl_session_timeout 10m;
|
|
|
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
|
|
|
# Gzip Compression
|
|
gzip on;
|
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
|
|
|
location / {
|
|
resolver 127.0.0.11;
|
|
set $upstream "gitea:3000";
|
|
|
|
client_max_body_size 10000M; # Push large objects to gitea
|
|
|
|
proxy_set_header X-Forwarded-Host $host:$server_port;
|
|
proxy_set_header X-Forwarded-Server $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_pass http://$upstream;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $http_connection;
|
|
proxy_set_header Connection $http_connection;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name git.zinomedia.de;
|
|
return 301 https://$host$request_uri;
|
|
}
|