Enabling SSL on apache instance on EC2

前端 未结 6 1977
南旧
南旧 2020-12-29 03:32

I have an EC2 instance that is using Amazon\'s custom linux install with built in apache. This install also has openssl installed. That being said, there does not appear t

6条回答
  •  心在旅途
    2020-12-29 03:59

    Here's what worked for me, via shell, with a wildcard cert that had a CA bundle (on Lightsail servers, HTTPS/443 enabled). Mileage may vary. Test on https://www.digicert.com/help/ after install. For brevity, I've shortened the certs/keys here (obviously).

    It's worth noting also that I did not need to set up a VirtualHost for the domain.

    # Overwrite these files on Amazon Linux + mod_ssl (or mod24_ssl)
    # /etc/pki/tls/certs/ca-bundle.crt
    # /etc/pki/tls/certs/localhost.crt
    # /etc/pki/tls/private/localhost.key
    
    ## BEGIN
    
    # INSTALL AS ROOT
    sudo -su root
    
    sudo cat > /etc/pki/tls/certs/localhost.crt < /etc/pki/tls/private/localhost.key < /etc/pki/tls/certs/ca-bundle.crt <

提交回复
热议问题