Type: unauthorized Detail: Invalid response from

My domain is: veritebranded.com

I ran this command: sudo certbot --apache -d veritebranded.com -d www.veritebranded.com

It produced this output: sudo certbot --apache -d veritebranded.com -d www.veritebranded.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for veritebranded.com
http-01 challenge for www.veritebranded.com
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. www.veritebranded.com (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://veritebranded.com/.well-known/acme-challenge/07BLTMRFoqFaopZKknAbe2YZK3HX96lkMER841Cq8h8 [Server-IP]: "<!doctype html><html class="ltr" lang="en"> var BASE_URL = 'http\u003A\u002F\u002Fveritebranded.com\u002F'; var", veritebranded.com (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://veritebranded.com/.well-known/acme-challenge/9KMA6ven9_L6zwsVoWEh6-_cNkh4jSBaCIYi8E0fit0 [Server-IP]: "<!doctype html><html class="ltr" lang="en"> var BASE_URL = 'http\u003A\u002F\u002Fveritebranded.com\u002F'; var"

IMPORTANT NOTES:

My web server is (include version): Apache2

The operating system my web server runs on is (include version): Ubuntu 18.04 LTS

My hosting provider, if applicable, is: godaddy

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

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):certbot 0.31.0

I did same thing for my stg subdomain and everything worked fine but I don't under stand what the issue here.

1 Like

Is your stg subdomain on the same server as this one?

It has a different IP address to your main domain.

1 Like

It has the different IP though but stg pem files are there on this server.

1 Like

Welcome to the Let's Encrypt Community, Arun :slightly_smiling_face:

So it looks like you are redirecting http://veritebranded.com to http://3.226.242.192 instead of https://veritebranded.com.

Any thoughts @_az?

Screenshot_20201009-161609_Samsung Internet

Screenshot_20201009-162510_Samsung Internet

1 Like

HI Griffin,
how it is showing 500 while I can access - http://veritebranded.com/

1 Like

A very wise question indeed. :thinking:

1 Like

I see that veritebranded.com is registered and hosted through GoDaddy. Do you have any of GoDaddy's domain forwarding services active for this domain perchance?

1 Like

No Boss, it is directly pointed to the given IP.

1 Like

I know the DNS records are, but inside GoDaddy's Manage Domains webpage in your main GoDaddy account (not your hosting account), do you have (or have you recently had) any type of domain forwarding turned on? I ask because I've been a regular GoDaddy costumer for a long time and know some of the nonstandard things they do.

For example:

1 Like

Hold up. You're using Magento aren't you?

1 Like

No, I am using this domain for Magento 2 platform and domain is directly mapped to the web server IP.
Is there any chance that stg keys may impact the process as I just replicate the stg server to production server using AWS AMI.

1 Like

If you are meaning your certificate private keys for your stg subdomain, no that would not matter here.

All good on stg.veritebranded.com

1 Like

Yeah.. I generated for stg subdomain only. I don't know what is just happening with this.
I've been using letsencrypt since 5 years this is the first time I got stuck

1 Like

It's not really that Let's Encrypt isn't behaving with the server for veritebranded.com. It's that there's an instability in the server configuration for veritebranded.com. Did you notice the crash log I posted up higher for http://veritebranded.com ?

1 Like

I fixed that issue, this was due to cache flush.

This is apache2 details -

<VirtualHost *:80>
     #ServerAdmin admin@domain.com
     DocumentRoot /var/www/html/ecom/
     ServerName veritebranded.com

     <Directory /var/www/html/ecom/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine off
#RewriteCond %{SERVER_NAME} =veritebranded.com
#RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
1 Like

What says apachectl -S?

1 Like

apachectl -S
VirtualHost configuration:
*:80 veritebranded.com (/etc/apache2/sites-enabled/magento2.conf:1)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex ssl-stapling: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/run/apache2/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33 not_used
Group: name="www-data" id=33 not_used

output of apachectl -S

1 Like

Are the previous file contents you showed from /etc/apache2/sites-enabled/magento2.conf?

1 Like

Yeah... Thats correct

1 Like

We get some spaghetti apache configurations here with files that aren't even used. :grin:

1 Like