I ran into a problem where i tried a lot but couldnt resolve please help !!
My domain is:
I ran this command: certbot certonly --webroot -w $WEBROOT_PATH -d $DOMAIN --non-interactive --agree-tos --email $EMAIL
It produced this output:
Certbot failed to authenticate some domains (authenticator: webroot). The Certificate Authority reported these problems:
Domain: stag-blogs.devcentrehouse.eu
Type: unauthorized
Detail: 54.159.226.253: Invalid response from http://stag-blogs.devcentrehouse.eu/.well-known/acme-challenge/zZgqYFZybE-mnGJx6bK9vTcrm40z9RMhToevb7QDyWU: 404
Hint: The Certificate Authority failed to download the temporary challenge files created by Certbot. Ensure that the listed domains serve their content from the provided --webroot-path/-w and that files created there can be downloaded from the internet.
My web server is (include version): apache2
The operating system my web server runs on is (include version): im running on aws fargate docker wordpress container
My hosting provider, if applicable, is: cloudflare
I can login to a root shell on my machine (yes or no, or I don't know): yes i can access to my container
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 2.1.0
currently im using wordpress container on aws fargate, i have allowed necessary inbound rules,
80,443 for my loadbalancer dns on 0.0.0.0/0 lb-sg
i have container-sg where 80,443 inbound access from my loadbalancer configured.
this is my default.conf file copying this to /etc/apache2/sites-available/000-default.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName stag-blogs.devcentrehouse.eu
DocumentRoot /var/www/html
<Directory /var/www/html>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
# Serve the challenge files from the .well-known directory
Alias /.well-known/acme-challenge/ /var/www/html/.well-known/acme-challenge/
<Directory "/var/www/html/.well-known/acme-challenge/">
Options None
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# Redirect HTTP to HTTPS
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L]
</VirtualHost>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
ServerName stag-blogs.devcentrehouse.eu
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
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/stag-blogs.devcentrehouse.eu/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/stag-blogs.devcentrehouse.eu/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
i have checked necessary webroot folder under /var/www/html
there is /var/www/html/.well-known/acme-challenge
with 775 permission too which i created manually using dockerfile.
I have forwarded 80 http loadbalancer port to container port too
what can be the problem as my apache2 is also running on port 80.
I tried to stop apache2 and install certificate using --standalone too but still not working.
the certificate file is not generated as i checked on /etc/letsencrypt/ there is no /live directory created.
Please suggest me some thing.