roles/nginx: Add support for gitea

gitea hosts are basically webservers, but we need to proxy pass. I
am setting up gitea itself manually for now.
This commit is contained in:
Alan Orth 2021-09-27 12:15:47 +03:00
parent f8752bb3e7
commit d5eed5055e
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
2 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,5 @@
location / {
proxy_pass http://localhost:3000;
}

View File

@ -7,6 +7,7 @@
{% set enable_hsts = item.enable_hsts | default(False) %}
{% set has_wordpress = item.has_wordpress | default(False) %}
{% set needs_php = item.needs_php | default(False) %}
{% set has_gitea = item.has_gitea | default(False) %}
# http -> https vhost
server {
@ -49,6 +50,10 @@ server {
{% include 'wordpress.j2' %}
{% endif %}
{% if has_gitea == True %}
{% include 'gitea.j2' %}
{% endif %}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;