Greetings those who will find an obvious flaw!
So, I am trying to set up LE for a server for the first time. For reasons I have been setting it up without encryption for a year (predominantly as I doubted whether it was even going to be used) - if it helps, there is Drupal and CiviCRM set up on the VPS.
I am probably missing something really simple in the conf file; but can not see the command for the pastebin (or whatever the wood and trees analogy is these days)
My domain is: fndepot.online
I ran this command: sudo certbot --apache
It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
The apache plugin is not working; there may be problems with your existing configuration.
The error was: PluginError('There has been an error in parsing the file /etc/apache2/sites-enabled/fndepot.online.conf on line 10: Syntax error')
Contents of letsencrypt.log
2024-03-30 13:10:18,475:DEBUG:urllib3.connectionpool:http://localhost:None "GET /v2/connections?snap=certbot&interface=content HTTP/1.1" 200 97
2024-03-30 13:10:18,948:DEBUG:certbot._internal.main:certbot version: 2.9.0
2024-03-30 13:10:18,948:DEBUG:certbot._internal.main:Location of certbot entry point: /snap/certbot/3643/bin/certbot
2024-03-30 13:10:18,948:DEBUG:certbot._internal.main:Arguments: ['--apache', '--preconfigured-renewal']
2024-03-30 13:10:18,948:DEBUG:certbot._internal.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#apache,PluginEntryPoint#manual,PluginEntr$
2024-03-30 13:10:18,966:DEBUG:certbot._internal.log:Root logging level set at 30
2024-03-30 13:10:18,967:DEBUG:certbot._internal.plugins.selection:Requested authenticator apache and installer apache
2024-03-30 13:10:19,054:DEBUG:certbot_apache._internal.configurator:Apache version is 2.4.38
2024-03-30 13:10:19,300:DEBUG:certbot._internal.plugins.disco:Other error:(PluginEntryPoint#apache): There has been an error in parsing the file /e$
Traceback (most recent call last):
File "/snap/certbot/3643/lib/python3.8/site-packages/certbot/_internal/plugins/disco.py", line 112, in prepare
self._initialized.prepare()
File "/snap/certbot/3643/lib/python3.8/site-packages/certbot_apache/_internal/configurator.py", line 388, in prepare
self.parser.check_parsing_errors("httpd.aug")
File "/snap/certbot/3643/lib/python3.8/site-packages/certbot_apache/_internal/parser.py", line 121, in check_parsing_errors
raise errors.PluginError(msg)
certbot.errors.PluginError: There has been an error in parsing the file /etc/apache2/sites-enabled/fndepot.online.conf on line 10: Syntax error
2024-03-30 13:10:19,308:DEBUG:certbot._internal.plugins.selection:No candidate plugin
Contents of conf file
VirtualHost *:80>
ServerAdmin REMOVED
DocumentRoot /var/www/html/fndepot.online
ServerName fndepot.online
ServerAlias www.fndepot.online
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/html/fndepot.online/>;
Options FollowSymlinks
AllowOverride All
Require all granted
<Directory /var/www/html/fndepot.online>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
RewriteRule ^ index.php [L]
My web server is (include version):
VPS Debian 10
The operating system my web server runs on is (include version):
My hosting provider, if applicable, is:
Fasthosts VPS
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):
2.9.0