- the certificate mywebsite-com.crt
- the key mywebsite-com.key
- the provider certificate aprovider-com.crt
scp mywebsite-com.crt user@server:/etc/ssl/[provider_name]/mywebsite-com.crt
scp mywebsite-com.key user@server:/etc/ssl/[provider_name]/mywebsite-com.key
scp aprovider-com.crt user@server:/etc/ssl/[provider_name]/aprovider-com.crt
cd /etc/apache2/sites-available
cp mywebsite.com.conf mywebsite.com-ssl.conf
edit it, here an exemple :
<VirtualHost *:443> # 443 for ssl, not 80
ServerAdmin contact@mywebsite.com
ServerName www.mywebsite.com
ServerAlias mywebsite.com
DocumentRoot /home/[user]/www/mywebsite/current/
<Directory /home/[user]/www/mywebsite/current/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ServerSignature Off
# Not sure, but I think it have to be at the end
# Lines order are very important
SSLEngine On
SSLCertificateFile /etc/ssl/[provider_name]/mywebsite-com.crt
SSLCertificateKeyFile /etc/ssl/[provider_name]/mywebsite-com.key
SSLCACertificateFile /etc/ssl/[provider_name]/aprovider-com.crt
</VirtualHost>
a2ensite mywebsite.com-ssl
service apache2 restart
Sources :
https://www.wistee.fr/installer-ssl/apache2-mod-ssl.html
🍺