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

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

	<IfModule mod_userdir.c>
		UserDir public_html
		UserDir disabled
		UserDir enabled archive infra wardo
		<Directory /home/*/public_html>
			AllowOverride FileInfo AuthConfig Limit Indexes
			Options +MultiViews +Indexes +SymLinksIfOwnerMatch +IncludesNoExec
			IndexOptions +FancyIndexing +HTMLTable +FoldersFirst +IconsAreLinks
			IndexStyleSheet /autoindex.css
			HeaderName HEADER.html
			ReadmeName README.html
			Require method GET POST OPTIONS
		</Directory>
	</IfModule>

	<IfModule mod_headers.c>
		Header set Access-Control-Allow-Origin "https://warricklo.net"
	</IfModule>

	<Directory /pub/www/users.warricklo.net>
		AllowOverride All
		Options Indexes FollowSymLinks
		Require all granted
	</Directory>

	<Directory /home/*/public_html>
		AllowOverride All
		Options Indexes FollowSymLinks
		Require all granted
	</Directory>

	<Directory "/home/wardo/public_html/secure">
		AuthType Basic
		AuthName "Restricted Content"
		AuthUserFile /home/wardo/.htpasswd
		Require valid-user
	</Directory>

	AddType text/plain .pgp

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