Installing letsencrypt on Ubuntu Server

My domain

I ran this command: sudo certbot --apache -d

It produced this output:
Failed authorization procedure. (http-01): urn:ietf:params:acme:e rror:unauthorized :: The client lacks sufficient authorization :: Invalid respon se from AGLjw1lLHGsR35LUik1U: "

404 Not Found

404 Not Found



  • The following errors were reported by the server:

    Type: unauthorized
    Detail: Invalid response from 1lLHGsR35LUik1U:

    404 Not Found

    404 Not Found


    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.

My web server is (include version): Apache2

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

My hosting provider, if applicable, is:

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

I’m using a control panel to manage my site (no, or provide the name and version of the control panel):


Did you have a existing Apache virtual host config for this site? If so, can you please share it?

Thank you

Thanks to you, here is
<VirtualHost *:80>
DocumentRoot /var/www/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

Hi @Dzoniii

there is a redirect:

download -h
Connection: keep-alive
Content-Length: 326
Content-Type: text/html; charset=iso-8859-1
Date: Thu, 06 Sep 2018 12:58:49 GMT
Server: nginx
X-Powered-By: PleskLin

Status: 302 Redirect has, has, a different ip-address.

Do you use plesk? There should be an integrated ssl-solution, this is the best choice.

Or: Remove the redirect.

Your is redirected complete to - there is a web interface.

Hello there and thank you so much for your response.I am quite new into this, so you make me more confuse.i cant change my IP on netcup.As far i remember i put diffirent IP on my Linux Apache virtualhost(,and when i type works fine(with .) but i cant install letscencrypt.

This ip isn't available - - timeout. So certbot may save there a file, but Letsencrypt isn't able to load that file.

If you can't fix it, you have to use dns-01 - validation. So you have to create a dns txt entry

with a special value.

Thank you so much @JuergenAuer

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