1
0
forked from infra/ansible
infra/roles/gogs/templates/vhost.j2

32 lines
586 B
Plaintext
Raw Permalink Normal View History

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