Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enabling SSL on apache instance on EC2

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 to be a mod_ssl.so to load up in httpd.conf.

So, I want to know the best way to get apache to be ssl enabled so I can setup my SSL virtual host (note that I have already setup the cert/signatures). Ideally, I would like to not have to rebuild/reinstall apache.

like image 770
Matthew Peterson Avatar asked Aug 04 '11 20:08

Matthew Peterson


People also ask

Where do I put SSL certificate in AWS?

It's a best practice that you upload SSL certificates to AWS Certificate Manager (ACM). If you're using certificate algorithms and key sizes that aren't currently supported by ACM or the associated AWS resources, then you can also upload an SSL certificate to IAM using the AWS Command Line Interface (AWS CLI).


2 Answers

Try this command:

 yum install mod_ssl  
like image 64
Jose Vega Avatar answered Sep 22 '22 18:09

Jose Vega


A summary of what needs to be done to enable SSL on apache server on EC2:

  1. Get SSL certificate (which you already did)
  2. Install mod_ssl as Jose Vega said
  3. Add the following lines to your httpd.conf 3.
NameVirtualHost *:443  <VirtualHost *:443>     ServerName www.example.com #    other configurations SSLEngine on SSLCertificateFile /etc/httpd/conf/ssl.crt/mydomain.crt SSLCertificateKeyFile /etc/httpd/conf/ssl.key/mydomain.key </VirtualHost> 

Finally, don't forget to open port 443 on your EC2 instance

like image 32
CodeBrew Avatar answered Sep 21 '22 18:09

CodeBrew