gvaweb/gvaweb/webtasks/templates/vhost.nginx
Jan Dittberner de322b3442 Change nginx vhost template
This commit reduces the nginx vhost template to the bare minimum needed
to get a vhost that can be used to get a certificate via letsencrypt's
certbot.
2020-02-29 12:02:32 +01:00

24 lines
459 B
Nginx Configuration File

server {
{% if wildcard -%}
server_name .{{ domain|parentdomain }};
{% else -%}
server_name {{ domain }};
{% -endif %}
listen 80;
listen [::]:80;
access_log /var/log/nginx/{{ domain }}.access.log;
error_log /var/log/nginx/{{ domain }}.error.log;
location /.well-known/acme-challenge {
root /srv/www/acme-challenge/{{ domain }};
}
location / {
return 301 https://$host$request_uri;
}
}
# vim: ft=nginx et sw=4 ts=4 si ai