Please make sure that your domain is entered correctly Error

Hi there I am trying to install SSL to my website. I have tried to run different commands (sudo certbot --nginx) and I have not been succesful in adding SSL to my website. My server listens on port 80 and 443.

My domain is: www.vegapump.co.uk/

I ran this command:
sudo certbot --authenticator webroot --webroot-path /var/www/site/ --installer nginx -d www.vegapump.co.uk --pre-hook “service nginx stop” --post-hook “service nginx start”

It produced this output:
http://www.vegapump.co.uk/.well-known/acme-challenge/SVJu7XrK-qKu1LaVk9-P566UHYY2ZSOGBuoa68GlL3U:
Connection refused

To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address. Additionally, please check that
your computer has a publicly routable IP address and that no
firewalls are preventing the server from communicating with the
client. If you’re using the webroot plugin, you should also verify
that you are serving files from the webroot path you provided.

My web server is (include version): Nginx

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

My hosting provider, if applicable, is:

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

Hi @cryptojp,

You are using webroot method which will try to validate your domain using the url http://www.vegapump.co.uk/.well-known/acme-challenge/[token} but you are stopping your web server --pre-hook “service nginx stop” so it won't be possible to validate it ;).

Try again your command but remove --pre-hook and --post-hook parameters and use --deploy-hook instead to reload your nginx server.

sudo certbot --authenticator webroot --webroot-path /var/www/laravel/public --installer nginx -d www.vegapump.co.uk --deploy-hook "service nginx reload"

Good luck,
sahsanu

3 Likes

Thank you so much sahsanu! It worked, I managed to get SSL on my website after trying for days. Thank you so much!!

1 Like

This works!
Thanks a lot!

1 Like

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