Multiple domains causes error

Hey,
I have a apache server on the version 2.4.10 on a raspberry pi 3 on the latest version of rasbian.
I have an existing webserver with a working certificate and wanted to expand it to a second domain (1 server, 2 domains to different root directorys) i’ve tried this one but i keep getting this error:

Error while running apache2ctl configtest.
Action ‘configtest’ failed.
The Apache error log may have more information.

apache2: Syntax error on line 219 of /etc/apache2/apache2.conf: Syntax error on line 13 of /etc/apache2/sites-
enabled/000-default-le-ssl.conf: Could not open configuration file /etc/letsencrypt/options-ssl-apache.conf: No

such
file or directory

any one could help me with this ? D:

Could you post a bit more background? The issue is clear from the message presented, but why that happened and what would be the best route forward depends heavily on the specifics of your environment. The starter questions presented when you created this topic would be a good start. Specifically what command you used. I’d also be interested in whether you managed any of the files Certbot creates manually. This can often lead to issues like this.

Obviously the easiest way around this is to remove the offending include from line 219 of /etc/apache2/apache2.conf.

As i said befor the system was or is working perfectly but i wanted to use 2 domains instead of one.
I found this article and tried to use this command: certbot-auto -d one.example.com -d two.example.com -d three.example.com -d example.org which ended in the error message.

Line 219 of /etc/apache2/apache2.conf is : IncludeOptional sites-enabled/*.conf

Interesting. So, one of the conf files in sites-enabled references a non-existent file. If you haven’t moved/deleted/changed any of the files in /etc/letsencrypt manually, it may have been an issue resulting from using certbot-auto delete. I’ve seen that happen before.

I think the best route here would be to rename any le conf files in /etc/apache2/sites-enabled so they no longer have a .conf extension (and thus are not picked up by that line 219), and give it a shot again.

1 Like

Thanks for that!
Deleting the .conf extension solved the problem but now im getting a new error a bit later from the same command:

No vhost exists with servername or alias of shadowlp.hopto.org. No vhost was selected. Please specify

ServerName or ServerAlias in the Apache config, or split vhosts into separate files.
Falling back to default vhost *:443…
No vhost exists with servername or alias of quantencomputer.hopto.org. No vhost was selected. Please specify
ServerName or ServerAlias in the Apache config, or split vhosts into separate files.
Falling back to default vhost *:443…

Maybe its because i changed the virtual host file to use it with 2 domains on 2 different root directorys (was working with ssl on one domain and non ssl on the other before)

Also this command crashd my current ssl certification
:frowning:

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