Reputation: 980
I have installed nginx
server in Amazon Linux 2
environment. During creation Elastic Load Balancer I created an free certificate by Amazon. Now, I want to access my server through https
(port 443
). How can I configure this SSL
certificate in nginx.conf
?
SSL configuration in nginx.conf is now commented. I saw it contains two lines like:
# ssl_certificate "/etc/pki/nginx/server.crt";
# ssl_certificate_key "/etc/pki/nginx/private/server.key";
Now, what is the location of Amazon certificate and key file location?
Upvotes: 3
Views: 2661
Reputation: 238497
You can't do this. ACM certificates can only be used on load balancers (LBs), CloudFront distributions and API gateway. They can't be used on instances.
This way you terminate your https on the LB, then from the LB there is only http connection to your instances:
Client ----(https)---> LB ----(http)----> Instance(s)
If you want to have https between LB and your instances, then you have to use self-signed certificate for that, but this is not commonly used. Usually termination of the https on the LB is sufficient.
Upvotes: 7