It produced this output:
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/mods-enabled/php7.4.conf on line 2: Syntax error')
My web server is (include version):
Apache/2.4.41 (Ubuntu)
The operating system my web server runs on is (include version):
Ubuntu 20.04.3 LTS
My hosting provider, if applicable, is:
N/A
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 1.18.0
That second quote ” looks like it was copy-pasted from a blog or something which converted it to a Unicode quote. Try replacing it with a regular ASCII quote (") like the rest.
I've now got another problem unfortunately. Running the command:
sudo certbot --apache
Results in the following output...
Requesting a certificate for iangrainger.co.uk and www.iangrainger.co.uk
Certbot failed to authenticate some domains (authenticator: apache). The Certificate Authority reported these problems:
Domain: iangrainger.co.uk
Type: dns
Detail: During secondary validation: DNS problem: query timed out looking up A for iangrainger.co.uk
Domain: www.iangrainger.co.uk
Type: dns
Detail: During secondary validation: No valid IP addresses found for www.iangrainger.co.uk
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.
Any ideas?
Will need to try resolving this tomorrow as it's after 2am here!