I have been following some tutorials online, and I have gotten my flask app up and running. I have added domain names, and they work correctly. However, now im trying to use Certbot to get a SSL certificate for nginx.
This is the command since I already have created the certificate.
certbot install --cert-name domainname.com
I keep getting the error:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Deploying certificate
Could not install certificate
Could not automatically find a matching server block for wehavetheleads.org. Set the `server_name` directive to use the Nginx installer.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
This is my etc/nginx/sites_enabled config file:
server {
listen 80;
server_name <public-server-ip>;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}