ansible/roles/gitea/templates/vhost.j2

32 lines
592 B
Plaintext
Raw Normal View History

2016-04-09 23:41:41 +02:00
server {
listen 80;
listen [::]:80;
2020-06-18 22:34:30 +02:00
server_name {{ gitea_domain }};
2016-04-09 23:41:41 +02:00
location /.well-known/acme-challenge {
default_type "text/plain";
alias /var/www/acme-challenge;
}
location / {
2020-06-18 22:34:30 +02:00
return 301 https://{{ gitea_domain }}$request_uri;
2016-04-09 23:41:41 +02:00
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
2020-06-18 22:34:30 +02:00
server_name {{ gitea_domain }};
2016-04-09 23:41:41 +02:00
2020-06-18 22:34:30 +02:00
ssl_certificate_key /etc/nginx/ssl/{{ gitea_domain }}.key;
ssl_certificate /etc/nginx/ssl/{{ gitea_domain }}.crt;
2016-04-09 23:41:41 +02:00
location / {
2020-06-18 22:34:30 +02:00
client_max_body_size 1024M;
2016-04-09 23:41:41 +02:00
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://localhost:3000;
}
}