Create certificate Error

Hi there,

I ran the command you suggested with an extra ‘-‘ for the webroot option

certbot --nginx --agree-tos --redirect --hsts --staple-ocsp --email serveradmin@jwservices.co.nz --webroot -w /var/www/html -d www.jwservices.co.nz

/var/www/html does not exist or is not a directory

This machine is setup as a proxy only and has no websites on it, it only redirects to the machines with the site on it.

Fixed the post for correctness :slight_smile:

This is found several times within your code:

location /.well-known/acme-challenge/ { 
    root /var/www/html; 
}

That directory doesn't exist?

Hi there,

That code i added after your suggestion earlier in this thread

I thought you would ensure that it worked before adding it.
And if I recall correctly, I merely reused one of the roots found in one of your server blocks.
I did not make that path up.
Had I, I would have asked you to create a new dedicated path for only challenge requests.
Review your code and the posts above.

In review, I think we may have gotten that "default code" from @_az
Who probably should have mentioned that you needed to validate it or adjust it to fit your needs - it was only being shown as a demonstrative example.

So...
The fix is to create that path or change all occurrences to an actual path on your system.

Hi all,

I have decided to shut down all my public facing servers mentioned in this thread.

thanks for your time.

1 Like

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