61 lines
1.6 KiB
Plaintext
Executable File
61 lines
1.6 KiB
Plaintext
Executable File
############################################
|
|
# config file for gitlab
|
|
############################################
|
|
|
|
upstream gitlab_backend {
|
|
server webserver.gitlab.svc;
|
|
server 1.1.1.1 backup;
|
|
}
|
|
|
|
server {
|
|
server_name gitlab.tryton.geeraert.eu www.gitlab.tryton.geeraert.eu;
|
|
location / {
|
|
proxy_pass https://gitlab_backend;
|
|
|
|
location ~* \.(html|css|jpg|gif|ico|js)$ {
|
|
proxy_cache cache;
|
|
proxy_cache_key $host$uri$is_args$args;
|
|
proxy_cache_valid 200 301 302 30m;
|
|
expires 30m;
|
|
proxy_pass https://gitlab_backend;
|
|
}
|
|
|
|
}
|
|
location /.well-known/acme-challenge/ {
|
|
root /var/www/certbot;
|
|
}
|
|
|
|
|
|
client_max_body_size 20m;
|
|
proxy_request_buffering off;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
http2 on;
|
|
ssl_protocols TLSv1.2;
|
|
|
|
|
|
listen 443 ssl;
|
|
ssl_certificate /etc/nginx/ssl/live/tryton.geeraert.eu/fullchain.pem;
|
|
ssl_certificate_key /etc/nginx/ssl/live/tryton.geeraert.eu/privkey.pem;
|
|
|
|
}
|
|
server {
|
|
if ($host = www.gitlab.tryton.geeraert.eu) {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
|
|
if ($host = gitlab.tryton.geeraert.eu) {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
server_name www.gitlab.tryton.geeraert.eu gitlab.tryton.geeraert.eu;
|
|
listen 80;
|
|
return 404;
|
|
|
|
}
|