Help with ssl certificate in AWS EC2 instance

Hello,

My domain is: pritamdey.in

I ran this command: sudo certbot --nginx

It produced this output:
Which names would you like to activate HTTPS for?
We recommend selecting either all domains, or all domains in a VirtualHost/server block.


1: ec2-54-91-247-129.compute-1.amazonaws.com


Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 1
Requesting a certificate for ec2-54-91-247-129.compute-1.amazonaws.com
An unexpected error occurred:
Error creating new order :: Cannot issue for "ec2-54-91-247-129.compute-1.amazonaws.com": The ACME server refuses to issue a certificate for this domain name, because it is forbidden by policy

My web server is (include version): AWS EC2

The operating system my web server runs on is (include version): Ubuntu 20

My hosting provider, if applicable, is: AWS

I can login to a root shell on my machine (yes or no, or I don't know): Yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel): no

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): certbot 2.6.0

Any help is appreciated.

Thanks,
Pritam

1 Like

Hi @pritam-dey3, and welcome to the LE community forum :slight_smile:

You should first create a vhost for your domain.
Create a website that responds to: http://pritamdey.in/
You may need to update the DNS also:

Name:    pritamdey.in
Address: 185.199.108.153

Note: The www seems to already be in use at github:

Name:      pritam-dey3.github.io
Addresses: 2606:50c0:8000::153
           2606:50c0:8001::153
           2606:50c0:8002::153
           2606:50c0:8003::153
           185.199.108.153
           185.199.109.153
           185.199.110.153
           185.199.111.153
Aliases:   www.pritamdey.in
4 Likes

Thanks a lot. It worked.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.