AWS certificate manager with nginx – How we set up it for you

AWS certificate manager with nginx

Table of Contents

Are you looking for an SSL certificate for AWS with free of cost?

AWS Certificate Manager (ACM) provides its clients with free SSL certificates for their websites.

However, problems can crop up due to both bad SSL and DNS configuration leading to errors while setting up an ACM certificate in the Nginx server.

At 1 onlyhost, we often get requests from our customers to AWS certificate manager with Nginx as part of our Server Management Services.

Today, we’ll see how our Support Engineers setup AWS certificate manager with Nginx and fix related errors.



How we set up SSL with AWS certificate manager

ACM can generate and manage SSL/TLS certificates for AWS based websites and applications. We can create or import and then manage a certificate using ACM.

However, an ACM certificate can only be created with services, such as Elastic Load Balancing, Amazon CloudFront, and AWS Elastic Beanstalk among others.

This is because one cannot use ACM to directly install the certificate on AWS-based website or application.
To obtain the SSL certificate, we first go to ACM and request for a certificate. ACM then issues the certificate for free.

The third-party certificate can be installed using the AWS certificate manager. However, a new certificate can only be issued or imported through it.

Before we install the SSL certificate, we should have a project, served by NGINX behind a load balancer.

Now, let’s see the detailed steps used by our Support Engineers to set up an ACM certificate with Nginx.

1. Initially, we log in to the AWS dashboard.

2. Then, we go to the Security & Identity > Certificate Manager and request a certificate.

3. We add a domain that will use the load balancer.

4. After issuing the certificate for the domain, we add it to the load balancer. For that, we select the load balancer and go to the Listeners tab.

5. Next, we edit the Nginx configuration file add the below code.

vim /etc/nginx/nginx.conf
server {
listen 80;
root /path/to/web/dir;

index index.php;

proxy_set_header X-Forwarded-Proto $scheme;
if ( $http_x_forwarded_proto != 'https' ) {
return 301 https://$host$request_uri;

location ~ \.php$ {
# PHP conf

Moreover, the exact Nginx configuration file to edit may be different depending on the server setup.

6. Finally, we restart Nginx using

service nginx restart


Common problems after setting up SSL on AWS

1 onlyhost’s years of experience in managing servers found that customers face different kinds of problems after installing and configuring SSL on the AWS server.

Let’s see how our Support Engineers solve these common errors.


1. Bad DNS configuration

Recently, one of our customers had a problem with the SSL certificate. The customer had installed the certificate via the AWS certificate manager and renewed it once it expired. However, the https didn’t work and showed a privacy error on the website.

On checking, we found the reason for this failure to renew the certificate was due to the DNS configuration of the domain not containing the correct CNAME records.

Therefore, our Support Engineers updated the correct CName in the DNS configuration file and that fixed the problem instantly.


2. Duplicate HTTPS servers

Sometimes, errors may happen due to incorrect SSL configuration too. This means a single IP address configured for two or more HTTPS servers can bring in problems.

For example,

server {
listen 443 ssl;

server {
listen 443 ssl;

Because of the bad SSL configuration, the NGINX does not know the name of the requested server. Therefore, it may provide the default server’s certificate.

So, our Support Engineers solve this problem by assigning a separate IP address to every HTTPS server.


[Having doubt on how to setup SSL on AWS? We’ll fix it for you.]



In short, free SSL can be installed via the AWS certificate manager. Today, we saw how our Support Engineers set up SSL through AWS certificate manager in Nginx and fix related errors.

Leave a Comment

Your email address will not be published. Required fields are marked *

Social Share


Cheapest Web Hosting

Fasters Web Hosting Promo
Scroll to Top

Launch your Website at RS599

Create a professional website yourself with our domain hosting combo. Get Extra benefits at this Year end Sale with 10% OFF and Enjoy Amazing Deels on Shared Hosting!

Starting at Only RS599/Year

Year End Sale


Use Code STARTBIZ at Checkout.

Create an earning opportunity with A Web Hosting Business

Become reseller and start reselling domains, web hosting, ssl certificates and More.

45% OFF

Starting at RS399/Month


Use coupon: at the checkout.