<IfModule mod_ssl.c>
<VirtualHost *:441>
	ServerName chat.aiki.info
	DocumentRoot "/var/www/chat"
	ServerAdmin root@aiki.info
	ErrorLog logs/chat-error_log
	CustomLog logs/chat-access_log common
	ScriptAlias /cgi-bin/ /var/www/chat/cgi-bin/
	ScriptAlias /x/ /var/www/chat/x/
	AddHandler cgi-script .cgi
	<Directory "/var/www/chat">
		Options +Indexes +SymLinksIfOwnerMatch
		Require all granted
		AllowOverride all
	</Directory>
	<Directory "/var/www/chat/cgi-bin">
		AllowOverride None
		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Require all granted
	</Directory>
	AddType text/plain .b .bb .bh .bbh .b1 .c .cc .h .sh .pl .py
	AddDefaultCharset utf-8
#	RewriteEngine on
	SSLCertificateFile /etc/letsencrypt/live/aiki.info/fullchain.pem
	SSLCertificateKeyFile /etc/letsencrypt/live/aiki.info/privkey.pem
	Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
<VirtualHost *:81>
	ServerName chat.aiki.info
	DocumentRoot "/var/www/chat"
	ServerAdmin root@aiki.info
	ErrorLog logs/chat-error_log
	CustomLog logs/chat-access_log combined
	RewriteEngine on
	RewriteRule ^/(.*)$ https://chat.aiki.info/$1 [L]
</VirtualHost>
</IfModule>
