ServerName repos.tomoyan.net RewriteEngine on RewriteCond %{HTTP_HOST} ^repos\.tomoyan\.net RewriteRule ^/(.*)$ https://repos.tomoyan.net/$1 [R=301,L] DocumentRoot "/var/www/vhosts/repos.tomoyan.net" ServerName repos.tomoyan.net SSLCertificateFile /etc/letsencrypt/live/tomoyan.net/cert.pem SSLCertificateKeyFile /etc/letsencrypt/live/tomoyan.net/privkey.pem SSLCertificateChainFile /etc/letsencrypt/live/tomoyan.net/chain.pem Require all granted Options All AllowOverride All DirectoryIndex index.php index.html