Apache doesn't HAVE to use vhosts in a separate file -- small bug

I used Certbot and it didn’t work right away.

I discovered the reason pretty quickly and everything worked fine, but here’s the issue:

My <VirtualHost *:443> directive had been created by certbot in a separate file.

This is probably the right way to do this in Apache, but for some technical or legacy reason, I had all my vhosts in the main config file, and the line to include the vhosts from an external file:

Include /usr/local/apache2/conf/vhosts/*.conf

was commented out. This is a perfectly valid way to do vhosts.

The fix for the bug would be simply to detect whether that include directive is being used or not.

If it’s commented out as mine was, put the new <VirtualHost *:443> directive in the main httpd.conf and optionally, notify the user.

Shall I report this as a bug for the Apache certbot?


I personally don't think using vHost in different files are a bug, since one file per vHost will definitely gave you some benefits over all in one vHost (not to mention certbot might fail to open that one file if it's too large)

Thank you

What I’m saying is, not recognising that the vhosts are in the main file not the external files is the bug. Certbot did fail to set up apache config up successfully after all.

It is a bug (oversight) if the newly created vhost config file was placed in a directory that isn’t included.

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