Certificate Authority failed to verify the temporary Apache configuration

I finally found the solution (or at least a solution which works), here

and in fact from here

Here is my virtualhost
<VirtualHost *:80>
ServerName chat.ixeo-conseil.com
ServerAlias chat.ixeo-conseil.com
ServerAdmin xxxx@xxxx.com
DocumentRoot /var/www/empty

     Alias /.well-known/acme-challenge/ /var/www/empty/.well-known/acme-challenge/
    <Directory "/var/www/empty/.well-known/acme-challenge/">
             Options None
             AllowOverride None
             ForceType text/plain
             RedirectMatch 404 "^(?!/\.well-known/acme-challenge/[\w-]{43}$)"
    </Directory>

     RewriteEngine on
     RewriteCond %{REQUEST_URI} !^/\.well-known
     RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [R]

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

</VirtualHost>

However, the file I have put in /var/www/empty/.well-known/acme-challenge is not found from a browser.
I don't try to understand... It works and that's it.
Thank you
Regards,
PS. May be somebody could mark this post as solved and close it. I don't know how to do it.

1 Like