Error with dehydrated and letsecrypt

Good day.
I trying sign site with dehydrated.
Web server nginx.
Site config(piece):
server_name vpstest1.fnxtezt.ru ;
root /var/www/fnxtezt.ru/html;
index index.html index.xml;
location / {
try_files $uri $uri/ =404;
}
location /.well-known/acme-challenge {
alias /var/www/dehydrated;
}
location ^~ /.well-known {
allow all;
Errors log:
dehydrated -c

INFO: Using main config file /etc/dehydrated/config

Processing vpstest1.fnxtezt.ru

Also, I disable ipv6 in centos, but no luck.

I am sorry, This log too much. Too many details.
cause of this error are wrong location for .well-known/acme-challenge ? Or other cause.
Ps. look like 443 port opened in firewall, but unsure.

Should I use site location or separate directory for dehydrated?

Separate is best but you should use root instead of alias for this situation.

The 404 error means that dehydrated placed the challenge token in the folder you said. But, when Let's Encrypt server tried to find that token your nginx said 404 Not Found.

So, the path in your nginx is not matching the folder you said in dehydrated.

I see you got 3 2 certs yesterday. What have you changed to make this not work? Be careful because you can only get 5 certs per week with the same names and many more will get you blocked for a week. You should use the Let's Encrypt staging system when testing. I don't know how you do that in dehydrated.

3 Likes

Unfortunatelly, this not working.
I replace syntax config. No luck. After I tried replace path for .well-known :

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

=============
This is not working.

Which folder have you set for wellknown in dehydrated for the challenge token?

2 Likes

/etc/dehydrated/config
WELLKNOWN="/var/www/fnxtezt.ru/html/.well-known/acme-challenge/"

I don't have dehydrated to test but I think this has to match your nginx

WELLKNOWN="/var/www/dehydrated"

and then in your nginx:

location /.well-known/acme-challenge {
    root /var/www/dehydrated;
}
2 Likes

replaced, but still show error.

That is a different domain name than earlier. This is the www subdomain of your earlier requests. Have you updated your nginx server block to include this name?

3 Likes

Good day. I tried remove www subdomain from dehydrated config and nginx:
dehydrated -c

INFO: Using main config file /etc/dehydrated/config

Processing vpstest1.fnxtezt.ru

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