<VirtualHost *:80>
    ServerName {{ gitea_subdomain }}.{{ item.name }}

    Redirect temp / https://{{ gitea_subdomain }}.{{ item.name }}/
</VirtualHost>

<VirtualHost *:443>
    ServerName {{ gitea_subdomain }}.{{ item.name }}

    SSLEngine               On
    DocumentRoot            "{{ item.doc_root }}"
    DirectoryIndex          index.html
    Options                 -Indexes
    HostnameLookups         Off

    ProxyRequests           Off
    ProxyPreserveHost       On
    ProxyPass               / http://localhost:3000/
    ProxyPassReverse        / http://localhost:3000/
</VirtualHost>