48 lines
1.4 KiB
Nginx Configuration File
48 lines
1.4 KiB
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name git.imagebrewing.com;
|
|
|
|
location ^~ /.well-known/acme-challenge/ {
|
|
root /var/www/html;
|
|
default_type text/plain;
|
|
}
|
|
|
|
location / {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
http2 on;
|
|
server_name git.imagebrewing.com;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/git.imagebrewing.com/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/git.imagebrewing.com/privkey.pem;
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_session_timeout 1d;
|
|
ssl_session_cache shared:GiteaSSL:10m;
|
|
ssl_session_tickets off;
|
|
|
|
access_log /www/wwwlogs/git.imagebrewing.com.log;
|
|
error_log /www/wwwlogs/git.imagebrewing.com.error.log;
|
|
|
|
client_max_body_size 100m;
|
|
add_header X-Content-Type-Options nosniff always;
|
|
add_header Referrer-Policy strict-origin-when-cross-origin always;
|
|
add_header X-Frame-Options SAMEORIGIN always;
|
|
|
|
location / {
|
|
proxy_pass http://127.0.0.1:13000;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_read_timeout 300s;
|
|
proxy_send_timeout 300s;
|
|
}
|
|
}
|