I run this command: sudo certbot --apache
It produced this output:
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 1
Requesting a certificate for platform.EXAMPLE.com
Certbot failed to authenticate some domains (authenticator: apache). The Certificate Authority reported these problems:
Domain: platform.EXAMPLE.com
Type: unauthorized
Detail: 2a02:4780:1e:b0c5:b9b:15a5:3510:369c: Invalid response from http://platform.EXAMPLE.com/ .well-known/acme-challenge/2FU35paxLaZIrPa2aWjqDeCX3mJ8l54XvosXA_7LQwI: 404
Hint: The Certificate Authority failed to verify the temporary Apache configuration changes made by Certbot. Ensure that the listed domains point to this Apache server and that it is accessible from the internet.
Some challenges have failed.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
My web server is (include version): Apache2
The operating system my web server runs on is (include version): Ubuntu 22.04
My hosting provider, if applicable, is: hostinger VPS
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot): 1.21.0
When I run "certbot certificates" it shows "No certificates found."
When I run " sudo apachectl -t -D DUMP_VHOSTS" It shows "VirtualHost configuration:
*:80 platform.EXAMPLE.com (/etc/apache2/sites-enabled/platform.conf:1)"
This is the error log
" tail -n 30 /var/log/letsencrypt/letsencrypt.log"
2023-10-23 11:03:36,993:DEBUG:certbot._internal.log:Exiting abnormally:
Traceback (most recent call last):
File "/usr/bin/certbot", line 33, in
sys.exit(load_entry_point('certbot==1.21.0', 'console_scripts', 'certbot')())
File "/usr/lib/python3/dist-packages/certbot/main.py", line 15, in main
return internal_main.main(cli_args)
File "/usr/lib/python3/dist-packages/certbot/_internal/main.py", line 1574, in main
return config.func(config, plugins)
File "/usr/lib/python3/dist-packages/certbot/_internal/main.py", line 1287, in run
new_lineage = _get_and_save_cert(le_client, config, domains,
File "/usr/lib/python3/dist-packages/certbot/_internal/main.py", line 133, in _get_and_save_cert
lineage = le_client.obtain_and_enroll_certificate(domains, certname)
File "/usr/lib/python3/dist-packages/certbot/_internal/client.py", line 459, in obtain_and_enroll_certificate
cert, chain, key, _ = self.obtain_certificate(domains)
File "/usr/lib/python3/dist-packages/certbot/_internal/client.py", line 389, in obtain_certificate
orderr = self._get_order_and_authorizations(csr.data, self.config.allow_subset_of_names)
File "/usr/lib/python3/dist-packages/certbot/_internal/client.py", line 439, in _get_order_and_authorizations
authzr = self.auth_handler.handle_authorizations(orderr, self.config, best_effort)
File "/usr/lib/python3/dist-packages/certbot/_internal/auth_handler.py", line 90, in handle_authorizations
self._poll_authorizations(authzrs, max_retries, best_effort)
File "/usr/lib/python3/dist-packages/certbot/_internal/auth_handler.py", line 178, in _poll_authorizations
raise errors.AuthorizationError('Some challenges have failed.')
certbot.errors.AuthorizationError: Some challenges have failed.
2023-10-23 11:03:36,993:ERROR:certbot._internal.log:Some challenges have failed.
2023-10-23 11:06:40,777:DEBUG:certbot._internal.main:certbot version: 1.21.0
2023-10-23 11:06:40,778:DEBUG:certbot._internal.main:Location of certbot entry point: /usr/bin/certbot
2023-10-23 11:06:40,778:DEBUG:certbot._internal.main:Arguments:
2023-10-23 11:06:40,778:DEBUG:certbot._internal.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#apache,PluginEntryPoint#manual,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2023-10-23 11:06:40,784:DEBUG:certbot._internal.log:Root logging level set at 30
2023-10-23 11:06:40,785:DEBUG:certbot._internal.display.obj:Notifying user: No certificates found.
And my conf file
<VirtualHost *:80>
DocumentRoot "/var/www/project-management/public"
DocumentRoot /var/www/project-management/public
ServerName platform.******.com
<Directory /var/www/project-management/public>
Options Indexes FollowSymLinks
AllowOverride All
order deny,allow
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
And my .htaccess file
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
#RewriteRule ^\.well-known\/acme-challenge\/ - [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>