<VirtualHost *:80>
	ServerName git.warricklo.net
	ServerAdmin webmaster@localhost
	DocumentRoot /pub/git

	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined

	Include conf-available/cgit.conf
	Alias /cgit "/pub/git/cgit"
	ScriptAlias / /usr/lib/cgit/cgit.cgi/

	<Directory /pub/git>
		AllowOverride All
		Options Indexes FollowSymLinks
		Require all granted
	</Directory>

	RewriteEngine on
	RewriteCond %{SERVER_NAME} =git.warricklo.net
	RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
