Letsencrypt-auto can't see ServerName in very basic apache2 setup

I had LE working great with my Apache server on Ubuntu 14.04. Today I went to add a new domain name, and LE didn't seem to work.

I thought I might have broken something inadvertently, so (since my setup is very minimal) I wiped the server and reinstalled everything from scratch - Ubuntu, LAMP, git, and finally LE. Set up just one domain name to try it with, with the following conf file:

<virtualhost *:80>
        ServerName example.org
        DirectoryIndex index.html index.php
        DocumentRoot /var/www/example.org
</virtualhost>

Tried LE and got the same problem as I had at the start:

No names were found in your configuration files. You should specify ServerNames in your config files in order to allow for accurate installation of your certificate.
If you do use the default vhost, you may specify the name manually. Would you like to continue?

What gives? This is literally the most basic apache2 config and LE doesn't like it. The ServerName is right there!

I feel like I've missed something really obvious. Any ideas?

Where is the config file with that VirtualHost located? I think the client might be expecting it in /etc/apache2/sites-enabled/.

Iā€™m also not 100% certain whether the client is able to handle <virtualhost> as opposed to <VirtualHost>. IIRC apache directives are case-insensitive, so it would be perfectly valid, but maybe the parser code in the client is case-sensitive (never checked for that myself).

1 Like

Ah, it seems it was expecting the case to be <VirtualHost>. Thank you!!

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