The error was: PluginError('There has been an error in parsing the file

Certbot is having trouble parsing this line in my apache config file:

RewriteCond ${symlinks:%{HTTP_HOST}} !=""

It’s basically from a larger routine that will redirect to the target of a symlink in the /var/www directory. It works well for canonical domains:

RewriteEngine On
RewriteMap symlinks prg:/var/www/redirector.pl
RewriteCond ${symlinks:%{HTTP_HOST}} !=""
RewriteRule ^/(.*) http://${symlinks:%{HTTP_HOST}}/$1 [R=301,L]

It all actually works so I’m guessing it’s just an uncommon use case that your parser isn’t used to seeing?

The error is

The error was: PluginError('There has been an error in parsing the file /etc/apache2/sites-enabled/000-default.conf on line 8: Syntax error',)

@bmw, could you take a look at this? It might be an Apache parser bug.

@brendon, do you know if you’re using the most recent version of Certbot? How did you install it, or what do you see with certbot --version? Thanks.

Hi @schoen, I just installed it now so it’ll be the latest version. It’s on Ubuntu 14.04. I just followed the apache/ubuntu install instructions on your site :slight_smile:

Hi @brendon, that is unfortunately not necessarily the latest version because OS packages, as with a lot of other software, can lag behind our release (even the PPA can take a little while to be brought up to date with a new release). The most recent version is 0.14.0, while the Ubuntu PPA that you would have used appears to be offering 0.12.0 right now.

I still hope @bmw can take a look into this issue.

Thanks @schoen, you’re right, it’s 0.12.0 :slight_smile:

@brendon, thanks for reporting the issue. The parsing library that Certbot uses to parse Apache configuration files errors on the snippet you included above. This is still the case in the latest version of Certbot.

I made an GitHub issue for the problem at #4637 and pinged our upstream contact to get it resolved. We’ll try to get this fixed soon!

2 Likes

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