<VirtualHost *:441>
	ServerName wordle.ucm.dev
	ServerAlias wordle au.wordle.ucm.dev us.wordle.ucm.dev
	DocumentRoot "/www/wordle"
	ServerAdmin sam@ucm.dev
	ErrorLog logs/wordle-error_log
	CustomLog logs/wordle-access_log combined
	ScriptAlias /x/ /www/wordle/x/
	ScriptAlias /a/ /www/wordle/a/
	AddHandler cgi-script .cgi
	<Directory "/www/wordle">
		Options +Indexes
		Options +FollowSymLinks -SymLinksIfOwnerMatch
		Require all granted
		AllowOverride All
	</Directory>
	<Directory "/www/wordle/x">
		AllowOverride None
		Options +ExecCGI -MultiViews
		Options +FollowSymLinks -SymLinksIfOwnerMatch
		Require all granted
	</Directory>
	<Directory "/www/wordle/a">
		AllowOverride None
		Options +ExecCGI -MultiViews
		Options +FollowSymLinks -SymLinksIfOwnerMatch
		AuthName "Admin Only"
		AuthType Basic
		AuthUserFile /www/wordle/.htpasswd
		Require valid-user
	</Directory>
	<Directory "/www/wordle/logout">
		AllowOverride None
		authname "Admin Only"
		authtype basic
		authuserfile /www/wordle/logout/.htpasswd
		require valid-user
	</Directory>
	<Directory "/www/wordle/log">
		Options +FollowSymLinks -SymLinksIfOwnerMatch
		AllowOverride None
		AuthName "Admin Only"
		AuthType Basic
		AuthUserFile /www/wordle/.htpasswd
		Require valid-user
	</Directory>

	AddDefaultCharset utf-8
	RewriteEngine on
#	RewriteRule ^/example$ https://example.com/ [L]
	SSLCertificateFile /etc/letsencrypt/live/ucm.dev/fullchain.pem
	SSLCertificateKeyFile /etc/letsencrypt/live/ucm.dev/privkey.pem
	Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
<VirtualHost *:80>
	ServerName wordle.ucm.dev
	ServerAlias wordle au.wordle.ucm.dev us.wordle.ucm.dev
	DocumentRoot "/www/wordle"
	ServerAdmin sam@ucm.dev
	ErrorLog logs/wordle-error_log
	CustomLog logs/wordle-access_log combined
	RewriteEngine on
	RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L]
</VirtualHost>
