apache2 vhost 80 to 443 redirect, single domain
The snippet can be accessed without any authentication.
Authored by
Dennis Ahrens
Edited
vhost.conf 608 B
<VirtualHost *:80>
ServerName forschungscluster.hs-hannover.de
# ServerAlias foo.example.com
ServerAdmin dennis.ahrens@hs-hannover.de
Redirect permanent / https://forschungscluster.hs-hannover.de
</VirtualHost>
<VirtualHost _default_:443>
ServerName forschungscluster.hs-hannover.de
# ServerAlias foo.example.com
DocumentRoot /var/www/forschungscluster
SSLEngine On
SSLHonorCipherOrder On
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
SSLProtocol All -SSLv2 -SSLv3
SSLCertificateFile /path/to/cert.pem
SSLCertificateKeyFile /path/to/cert.key
</VirtualHost>
Please register or sign in to comment