I ran this command: /root/certbot-auto --apache --staging
It produced this output: Failed authorization procedure. www.stefanmarcin.sk (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: The key authorization file from the server did not match this challenge [U7Z05MbBan_sQRbagOsMUOrbrefGfGsWiYZqTbXdz_c.Mxd6puZz877ZrQ7u9cPPc2amincbkMvNFjbgIj9OlQU] != [U7Z05MbBan_sQRbagOsMUOrbrefGfGsWiYZqTbXdz_c.JQoYFoTtPDe2MIr4xFKqpRpt0eKti-HMnJ0BIl9eOjE]
My web server is (include version): Apache/2.2.15
The operating system my web server runs on is (include version): Centos 6.10
My hosting provider, if applicable, is: my own home server
I can login to a root shell on my machine (yes or no, or I don’t know): "Yes"
I’m using a control panel to manage my site (no, or provide the name and version of the control panel): No
Guys, let me describe my problem and my setup:
1 Physical server with Centos 6.10
One virtual apache host - stefanmarcin.sk
No other virtual hosts or main hosts.
I want to apply LE only on that host
Also Document root is default - ,/var/www/html/"
Virtual hosts document root is - ,/home/sites/stefanmarcin"
Acme challenge produces the same error - unauthorized.
What else should I do ?
What should I check in my directiories ? I dont really understand that part with different accounts.
I am firing certbot with root privileges, and folders are assigned to nobody:nobody with 777 flags (for testing as I ran out of ideas what it could be)
Also - I ran the server behind NAT and I am using port forwarding, so my local address is 192.168.0.100. Just to be informed about my environment.
I don't understand how it's possible to create the order with one account and the content of the validation file with another account. But I use my own-written Letsencrypt - client. So I know the format of the file content - token, dot and the hash value.
The first part of your content is correct, only the second part is wrong.
No files have been in that directory and even when I deleted the parent folder, nothing happened, still the same error.
Thinking about /etc/hosts - there must be something specific ?
Also, wordpress is installed, maybe this could be issue ?
The key authorization file from the server did not match this challenge [7aniy-jiMmzp5Qi7TD9TD2O7Fi7JXzVzt33_8yzgwyA.K50uFwf8ZXDR6ymNZ8Xjujxw9i3YOPCuL05RBECjTCU] != [7aniy-jiMmzp5Qi7TD9TD2O7Fi7JXzVzt33_8yzgwyA.-f_daEYxVOFls4aupfol2f4PA8ikqBUw-4tU6dotcK8]
But @sahsanu said, that the ipv6 is misconfigured. And removing the ipv6 was the solution.
Then checked
[Address Type=IPv4,Server=Apache/2.2.15 (CentOS),HTTP Status=404] vs [Address Type=IPv6,Server=nginx,HTTP Status=200]
ipv6 sends http 200, ipv4 sends 404, this is bad.
So it looks like there are ipv6 - nginx - server which sends the wrong content.
Do you have a nginx and an apache? One used with another Letsencrypt-account?
YES ! Finally ! Removing IPv6 from my DNS records on my providers nameserver control panel, issuing new certificates and installing Really Simple SSL plugin did the trick.