-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable HTTPS on aws for single-instance (#417)
* Add ebextension config to get ssl certs - https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/https-storingprivatekeys.html * Add nginx conf to allow HTTPS - Config is created by modifying default nginx conf for HTTP
- Loading branch information
1 parent
42bfa75
commit e412f51
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Resources: | ||
AWSEBAutoScalingGroup: | ||
Metadata: | ||
AWS::CloudFormation::Authentication: | ||
S3Auth: | ||
type: "s3" | ||
buckets: ["mysterio-ssl"] | ||
roleName: | ||
"Fn::GetOptionSetting": | ||
Namespace: "aws:autoscaling:launchconfiguration" | ||
OptionName: "IamInstanceProfile" | ||
DefaultValue: "aws-elasticbeanstalk-ec2-role" | ||
files: | ||
"/etc/pki/tls/certs/mysterio.com.key": | ||
mode: "000400" | ||
owner: root | ||
group: root | ||
authentication: "S3Auth" | ||
source: https://mysterio-ssl.s3.ap-south-1.amazonaws.com/mysterio.com.key | ||
"/etc/pki/tls/certs/mysterio.com.pem": | ||
mode: "000400" | ||
owner: root | ||
group: root | ||
authentication: "S3Auth" | ||
source: https://mysterio-ssl.s3.ap-south-1.amazonaws.com/mysterio.com.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
server { | ||
listen 443 default_server ssl; | ||
ssl_certificate /etc/pki/tls/certs/mysterio.com.pem; | ||
ssl_certificate_key /etc/pki/tls/certs/mysterio.com.key; | ||
access_log /var/log/nginx/access_ssl.log main; | ||
|
||
client_header_timeout 60; | ||
client_body_timeout 60; | ||
keepalive_timeout 60; | ||
gzip off; | ||
gzip_comp_level 4; | ||
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; | ||
|
||
# Include the Elastic Beanstalk generated locations | ||
include conf.d/elasticbeanstalk/*.conf; | ||
} |