42 lines
1.2 KiB
Plaintext
42 lines
1.2 KiB
Plaintext
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
server_name git.zinomedia.de;
|
|
|
|
access_log off;
|
|
error_log /var/log/nginx/error.log error;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/git.zinomedia.de/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/git.zinomedia.de/privkey.pem;
|
|
|
|
include "snippets/ssl-optimizations.conf";
|
|
|
|
# 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;
|
|
}
|