Ubuntu 12.04 // The apache plugin is not working; there may be problems with your existing configuration


Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

Hi there,

I’m attempting to use a LE cert on one of our company’s older web servers. I absolutely apologize that I cannot provide the domain in question but I hope this can be resolved without the need for that. The error states that it cannot parse a line in the apache config file that is used exclusively for SSL Vhosts.

Line 837 cannot be parsed. It is the bottom line in that file and only contains the following:


I don’t see any problem with the syntax here. What am I doing wrong or what can I do to fix this? I appreciate it is on an older platform but this cannot be upgraded easily hence I’m hoping to find a fix for this!

Thanks! More info below:

My domain is:
<private sorry!>

I ran this command:
./certbot-auto --apache certonly

It produced this output:
Could not choose appropriate plugin: 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/ssl-vhost.conf on line 837: Syntax error’,)

My web server is (include version):
Apache 2.2.22

The operating system my web server runs on is (include version):
Ubuntu 12.04

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don’t know):

I’m using a control panel to manage my site (no, or provide the name and version of the control panel):


Hi @spawnsworth,

Could you please show the output of this command?.

sed -n 830,840p /etc/apache2/ssl-vhost.conf



Thanks! The output is below:

     sed -n 830,840p /etc/apache2/ssl-vhost.conf
                        <FilesMatch "\.css$">
                        ForceType text/css



That is strange, the command should show 10 lines, or if line 837 is the last line it should show 8 lines but I only see 7.

830                         <FilesMatch "\.css$">
831                        ForceType text/css
832                        </FilesMatch>
835 </Directory>
836 </VirtualHost>

Please show the output of these commands:

sed -n 830,840p /etc/apache2/ssl-vhost.conf | cat -A
sed -n 837p /etc/apache2/ssl-vhost.conf | cat -A


Ha. Good point! I called the file up in vi and displayed line numbers. Sorry but it appears that there are only 836 lines in the file! The error states it cannot parse line 837. When I ‘goto’ line 837 it takes me to the bottom line which is actually 836.

There’s nothing else after 836 it is absolutely the last line of the file so is there something else that should be in place to precent certbot from trying to parse anything beyond the bottom line?



Maybe it is because a strange character in previous lines.

Show this output please:

sed -n 830,840p /etc/apache2/ssl-vhost.conf | cat -A


OK! …

/home/tibus# sed -n 830,840p /etc/apache2/ssl-vhost.conf | cat -A
                        <FilesMatch "\.css$">$
                        ForceType text/css$

Thanks :slight_smile:


Sorry but that seems right to me, maybe the problem starts before that… let’s call certbot developers so they can check this issue.

@bmw, @joohoi, could you please be so kind and take a look to this Apache conf parsing issue?.



Could you maybe post the actual Apache configuration file, replacing the domain name with example.com if necessary?

Also, hopefully you’re a Canonical customer to receive extended support if you’re still running 12.04—otherwise software updates ended last year.



Does the file happen to begin with something like this?

<IfModule mod_ssl.c>

If so you need to add this at the end:



OMG you nailed it!

Absolutely spot on. I can’t believe that hasn’t broke anything. The file has been untouched for months!

Working brilliant now thank you very much for all the help guys!


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.