I am trying to implement a paid SSL certificate for a specific domain like webmail.domain.com in a mail server. I know has something to do with apache but I am not sure where specifically. Please can somebody help me?
I recently found a solution to make it work so I thought might be helpful if I will post it here. So basically I did this: I created a folder named ssl.crt in /etc/apache2/
and placed inside it the certificate files webmail.domain.com.bundle webmail.domain.com.crt webmail.domain.com.key. Then entered the conf-enabled folder placed in /etc/apache2/
and created a vhost configuration file named as my website domain name to webmail-domain-ssl.conf and entered this code inside it:
<VirtualHost *:80>
ServerAdmin sysadmin@domain.com
DocumentRoot /opt/roundcube
ServerName webmail.domain.com
RewriteEngine On
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin sysadmin@domain.com
DocumentRoot /opt/roundcube
ServerName webmail.domain.com
ErrorLog ${APACHE_LOG_DIR}/error.log
SSLEngine On
SSLProtocol All -SSLv2 -SSLv3
SSLHonorCipherOrder on
SSLCertificateFile /etc/apache2/ssl.crt/webmail.domain.com.crt
SSLCertificateKeyFile /etc/apache2/ssl.crt/webmail.domain.com.key
SSLCertificateChainFile /etc/apache2/ssl.crt/webmail.domain.com.bundle
</VirtualHost>
</IfModule>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.