installing an SSL on Azure ubuntu web server -
i have been trying install ssl certificate on ubuntu server running on vps.
he did resolve issue. 1. created new endpoint (https - port 443) microsoft azure portal
on ubuntu vm terminal, did following. enable ssl module in apache2 issue command below
sudo a2enmod ssl
the need enable site using ssl
sudo a2ensite default-ssl
the directories /etc/ssl/certs , /etc/ssl/private default locations. if install certificate , key in directory make sure change sslcertificatefile , sslcertificatekeyfile appropriately. add following default-ssl file.
sslengine on sslcertificatekeyfile /etc/sslmate/example.com.key sslcertificatefile /etc/sslmate/example.com.crt sslcertificatechainfile /etc/sslmate/example.comchain.crt sslprotocol -sslv2 -sslv3 sslciphersuite ecdhe-rsa-aes128-gcm-sha256:ecdhe-ecdsa-aes128-gcm-sha256:ecdhe-rsa-aes256-gcm-sha384:ecdhe-ecdsa-aes256-gcm-sha384:dhe-rsa-aes128-gcm-sha256:dhe-dss-aes128-gcm-sha256:kedh+aesgcm:ecdhe-rsa-aes128-sha256:ecdhe-ecdsa-aes128-sha256:ecdhe-rsa-aes128-sha:ecdhe-ecdsa-aes128-sha:ecdhe-rsa-aes256-sha384:ecdhe-ecdsa-aes256-sha384:ecdhe-rsa-aes256-sha:ecdhe-ecdsa-aes256-sha:dhe-rsa-aes128-sha256:dhe-rsa-aes128-sha:dhe-dss-aes128-sha256:dhe-rsa-aes256-sha256:dhe-dss-aes256-sha:dhe-rsa-aes256-sha:aes128-gcm-sha256:aes256-gcm-sha384:aes128-sha256:aes256-sha256:aes128-sha:aes256-sha:aes:camellia:des-cbc3-sha:!anull:!enull:!export:!des:!rc4:!md5:!psk:!aecdh:!edh-dss-des-cbc3-sha:!edh-rsa-des-cbc3-sha:!krb5-des-cbc3-sha sslhonorcipherorder on sslcompression off
now configured https, restart apache2 service enable new settings:
sudo service apache2 restart
you might want redirect http request https, add code below virtualhost file listening port 80. redirect http request https (https://example.com)
<virtualhost _default_:80> rewriteengine on rewriterule /.* https://example.com/ [r] </virtualhost>
Comments
Post a Comment