<VirtualHost *:441>
	ServerName nika.try.coach
	ServerAlias nika au.nika.try.coach us.nika.try.coach
	DocumentRoot "/www/nika"
	ServerAdmin sam@try.coach
	ErrorLog logs/nika-error_log
	CustomLog logs/nika-access_log combined
	ScriptAlias /x/ /www/nika/x/
	ScriptAlias /a/ /www/nika/a/
	AddHandler cgi-script .cgi
	<Directory "/www/nika">
		Options +Indexes
		Options +FollowSymLinks -SymLinksIfOwnerMatch
		Require all granted
		AllowOverride All
	</Directory>
	<Directory "/www/nika/x">
		AllowOverride None
		Options +ExecCGI -MultiViews
		Options +FollowSymLinks -SymLinksIfOwnerMatch
		Require all granted
	</Directory>
	<Directory "/www/nika/a">
		AllowOverride None
		Options +ExecCGI -MultiViews
		Options +FollowSymLinks -SymLinksIfOwnerMatch
		AuthName "Admin Only"
		AuthType Basic
		AuthUserFile /www/nika/.htpasswd
		Require valid-user
	</Directory>
	<Directory "/www/nika/logout">
		AllowOverride None
		authname "Admin Only"
		authtype basic
		authuserfile /www/nika/logout/.htpasswd
		require valid-user
	</Directory>
	<Directory "/www/nika/log">
		Options +FollowSymLinks -SymLinksIfOwnerMatch
		AllowOverride None
		AuthName "Admin Only"
		AuthType Basic
		AuthUserFile /www/nika/.htpasswd
		Require valid-user
	</Directory>
	AddDefaultCharset utf-8
	RewriteEngine on
#	RewriteRule ^/example$ https://example.com/ [L]
	SSLCertificateFile /etc/letsencrypt/live/try.coach/fullchain.pem
	SSLCertificateKeyFile /etc/letsencrypt/live/try.coach/privkey.pem
	Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
<VirtualHost *:80>
	ServerName nika.try.coach
	ServerAlias nika au.nika.try.coach us.nika.try.coach
	DocumentRoot "/www/nika"
	ServerAdmin sam@try.coach
	ErrorLog logs/nika-error_log
	CustomLog logs/nika-access_log combined
	RewriteEngine on
	RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L]
</VirtualHost>
