I think @JuergenAuer made an assumption that the file was encoded using a character set like ISO 8859-1, but it could have been encoded using a different character set, in which case the offending character could be something different from ä. If your file contains text and comments in Turkish, for example, it could be any of the letters çğıöşü which occur in the Turkish alphabet but not in the ASCII character set.
You could use a command like
grep -r -P "[^\x00-\x7F]" /etc/apache2
to locate any non-ASCII characters in this web server configuration file.
It’s also possible that upgrading to a newer version of Certbot will help with some configuration file parsing problems, as indicated by @gpatel-fr (if you have certbot-auto
, you have to explicitly run it as ./certbot-auto
rather than certbot
in order to get the benefit of the automatic installer).