Failed authorization procedure, Type: unauthorized

When trying to activate an ssl on my domain i receive the following:

Failed authorization procedure. example.co.uk (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://example.co.uk/.well-known/acme-challenge/V-AygSz24FOZQyAYeXh3grk0LKeaWpiYvEWSNjOX8u4: "<meta name="viewport" content="width=device-width, initial-scale=1"

Domain: example.co.uk
Type: unauthorized
Detail: Invalid response from
http://example.co.uk/.well-known/acme-challenge/V-AygSz24FOZQyAYeXh3grk0LKeaWpiYvEWSNjOX8u4:
"<meta name="viewport" content="width=device-width,
initial-scale=1"

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.

As far as i can see my DNS is setup correctly.

Here is my virtual host file:

<VirtualHost *:80>
ServerAdmin ***********
ServerName example.co.uk
ServerAlias www.example.co.uk
DocumentRoot /var/www/html

    <Directory /var/www/html>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

Any ideas on how i can resolve this?

Thanks

How are you running certbot?

sudo letsencrypt, then selecting my domain

How about this?

sudo letsencrypt -a webroot -i apache -w /var/www/html -d bodyshocker-trade.co.uk -d www.bodyshocker-trade.co.uk

If that doesn’t work, are you able to create /var/www/html/.well-known/acme-challenge/test.txt (or whatever your true webroot is) and access it via the browser?

I have literally just managed to solve this by installing the ssl for www.example.co.uk on its own first, and then doing a separate install for example.co.uk.

Not sure why, but this worked.

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