Can't configure SSL

November 22, 2017 383 views
Server Optimization

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 servername directive to your nginx configuration: https://nginx.org/en/docs/http/servernames.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?

Be the first one to answer this question.