<IfModule mod_ssl.c>
<VirtualHost *:441>
	ServerName habits.aiki.info
	DocumentRoot "/var/www/habits"
	ServerAdmin root@aiki.info
	ErrorLog logs/habits-error_log
	CustomLog logs/habits-access_log common
	ScriptAlias /x/ /var/www/habits/x/
	AddHandler cgi-script .cgi
	<Directory "/var/www/habits">
		Options +Indexes +SymLinksIfOwnerMatch
		Options +ExecCGI
		Require all granted
		AllowOverride all
	</Directory>
	<Directory "/var/www/habits/x">
		AllowOverride None
		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Require all granted
	</Directory>
	<LocationMatch "/\.">
		Require all denied
	</LocationMatch>
	<DirectoryMatch "/u$|/u/">
		Require all denied
	</DirectoryMatch>
	AddType text/plain .b .bb .bh .bbh .b1 .c .cc .h .sh .pl .py
	AddDefaultCharset utf-8
	SSLCertificateFile /etc/letsencrypt/live/aiki.info/fullchain.pem
	SSLCertificateKeyFile /etc/letsencrypt/live/aiki.info/privkey.pem
	Include /etc/letsencrypt/options-ssl-apache.conf
	RewriteEngine On
	RewriteCond %{QUERY_STRING} ^(.*)(?:^|&)fbclid=(?:[^&]*)((?:&|$).*)$ [NC]
	RewriteCond %1%2 (^|&)([^&].*|$)
	RewriteRule ^(.*) $1?%2 [R=301,L]
</VirtualHost>
<VirtualHost *:81>
	ServerName habits.aiki.info
	DocumentRoot "/var/www/habits"
	ServerAdmin root@aiki.info
	ErrorLog logs/habits-error_log
	CustomLog logs/habits-access_log combined
	RewriteEngine on
	RewriteRule ^/(.*)$ https://habit.aiki.info/$1 [L]
</VirtualHost>
</IfModule>
