54 lines
1.3 KiB
Plaintext
54 lines
1.3 KiB
Plaintext
server {
|
|
if ($host = www.git.crenam.space) {
|
|
return 301 https://$host$request_uri;
|
|
} # managed by Certbot
|
|
|
|
|
|
if ($host = git.crenam.space) {
|
|
return 301 https://$host$request_uri;
|
|
} # managed by Certbot
|
|
|
|
|
|
listen 80;
|
|
server_name git.crenam.space www.git.crenam.space;
|
|
|
|
location / {
|
|
return 301 https://git.crenam.space$request_uri;
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl http2;
|
|
server_name git.crenam.space www.git.crenam.space;
|
|
|
|
# ---------- Authelia ----------
|
|
# include /etc/nginx/snippets/authelia-verify.conf;
|
|
|
|
location / {
|
|
client_max_body_size 512M;
|
|
|
|
# include /etc/nginx/snippets/authelia-authrequest.conf;
|
|
|
|
# auth_request_set $auth_user $upstream_http_remote_user;
|
|
# proxy_set_header X-Webauth-user $auth_user;
|
|
|
|
proxy_pass http://192.168.1.15:3000;
|
|
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection $http_connection;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
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;
|
|
}
|
|
|
|
ssl_certificate /etc/letsencrypt/live/git.crenam.space/fullchain.pem; # managed by Certbot
|
|
ssl_certificate_key /etc/letsencrypt/live/git.crenam.space/privkey.pem; # managed by Certbot
|
|
|
|
}
|