im using this command to enable my SSL: sudo certbot --nginx -d parquestecnologicos.tk -d www.parquestecnologicos.tk
but i got this error
Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected: Authenticator nginx, Installer nginx Obtaining a new certificate Performing the following challenges: tls-sni-01 challenge for parquestecnologicos.tk tls-sni-01 challenge for www.parquestecnologicos.tk Cleaning up challenges Cannot find a VirtualHost matching domain parquestecnologicos.tk. In order for Certbot to correctly perform the challenge please add a corresponding server_name directive to your nginx configuration: https://nginx.org/en/docs/http/server_names.html
my sites-available/default file is:
server {
listen 80 default_server;
root /usr/share/nginx/html;
index index.html index.htm;
# Make site accessible from http://localhost/
server_name parquestecnologicos.tk www.parquestecnologicos.tk;
location ~ /.well-known {
allow all;
root /usr/share/nginx/html;
}
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}
}
How i can solve this?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
I could suggest two things:
Make sure that you have the same content in the sites-enabled config directory
Try restarting Nginx first and then run the Certbot command again
If this still does not work you could run nginx -T and share the output here so that I could try to advise you further
Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.