| 1 | <VirtualHost *:80> |
| 2 | ServerAdmin webmaster@localhost |
| 3 | DocumentRoot /var/www/html |
| 4 | ErrorLog ${APACHE_LOG_DIR}/error.log |
| 5 | CustomLog ${APACHE_LOG_DIR}/access.log combined |
| 6 | |
| 7 | RedirectMatch ^/$ /cgit/ |
| 8 | </VirtualHost> |
| 9 | |
| 10 | {% if cgit_tls_key and cgit_tls_cert %} |
| 11 | <VirtualHost *:443> |
| 12 | ServerAdmin webmaster@localhost |
| 13 | DocumentRoot /var/www/html |
| 14 | ErrorLog ${APACHE_LOG_DIR}/error.log |
| 15 | CustomLog ${APACHE_LOG_DIR}/access.log combined |
| 16 | |
| 17 | SSLEngine on |
| 18 | SSLCertificateFile {{cgit_tls_cert}} |
| 19 | SSLCertificateKeyFile {{cgit_tls_key}} |
| 20 | |
| 21 | RedirectMatch ^/$ /cgit/ |
| 22 | |
| 23 | </VirtualHost> |
| 24 | |
| 25 | {% endif %} |