Hi I'm having major problems with a server, SSL works perfectly when connecting with https://..., I need to set up redirection from http to https.
This is my ssl.conf
, CentOS-6, with one IP address. SSL cert set up with SANs. Would rather not use .htaccess
.
Listen 172.21.11.48:443
NameVirtualHost 172.21.11.48:443
LoadModule ssl_module modules/mod_ssl.so
SSLEngine on
SSLSessionCache shmcb:/var/cache/httpd/mod_ssl/ssl_scache(512000)
<VirtualHost 172.21.11.48:443>
SSLEngine on
ServerAlias "webmail.example.com"
DocumentRoot "/var/www/html/roundcubemail"
SSLCertificateFile /etc/pki/tls/certs/aether.example.com.crt
SSLCertificateKeyFile /etc/pki/tls/private/aether.example.com-2048.key
SSLCACertificateFile /etc/pki/tls/certs/exampleca.crt
</VirtualHost>
<VirtualHost 172.21.11.48:443>
SSLEngine on
ServerAlias "cloud.example.com"
DocumentRoot "/var/www/html/owncloud"
SSLCertificateFile /etc/pki/tls/certs/aether.example.com.crt
SSLCertificateKeyFile /etc/pki/tls/private/aether.example.com-2048.key
SSLCACertificateFile /etc/pki/tls/certs/exampleca.crt
</VirtualHost>
When connecting on http://webmail.example.com it errors with:
Your browser sent a request that this server could not understand. Reason: You're speaking plain HTTP to an SSL-enabled server port
When I add another vhost on port 80, Apache fails to start. Any help would be gratefully received.
redirect non-SSL to SSL in apache
on Google?