<IfModule mod_ssl.c>
<VirtualHost *:441>
	ServerName plan.aiki.info
	DocumentRoot "/var/www/plan-old"
	ServerAdmin root@aiki.info
	ErrorLog logs/plan-old-error_log
	CustomLog logs/plan-old-access_log common
	ScriptAlias /cgi-bin/ /var/www/plan-old/cgi-bin/
	ScriptAlias /x/ /var/www/plan-old/x/
	AddHandler cgi-script .cgi
	<Directory "/var/www/plan-old">
		Options +Indexes +SymLinksIfOwnerMatch
		Require all granted
		AllowOverride all
	</Directory>
	<Directory "/var/www/plan-old/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
# RewriteCond %{SERVER_NAME} =plan.aiki.info [OR]
# RewriteCond %{SERVER_NAME} =plan
# RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]
	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 *:80>
	ServerName plan.aiki.info
	DocumentRoot "/var/www/plan-old"
	ServerAdmin root@aiki.info
	ErrorLog logs/plan-old-error_log
	CustomLog logs/plan-old-access_log combined
	RewriteEngine on
	RewriteRule ^/(.*)$ https://plan.aiki.info/$1 [L]
</VirtualHost>
</IfModule>
