r/apache • u/mikeymikeymikec • May 30 '26
Support apache SSL configuration: is <IfModule mod_ssl.c> still necessary?
OS: Ubuntu Server 24.x (the latest release)
Apache/2.4.58
I'm pretty new to maintaining (my own) Linux webserver which handles a few sites. It's all been working fine, but I wanted to get the default site working in SSL because I have a couple of uses for it. Based on the configuration that the Let's Encrypt certbot apparently created for me, I copied the default site config to a new file and made respective modifications, but I'm wondering if what certbot inserted into the main site's configuration is needed, referenced on the first and last lines of the main site's config file:
<IfModule mod_ssl.c>
</IfModule>I didn't use the default site's default SSL config file because the default site configuration I had been using included some extra bits like WebDAV support, but the default site's default SSL configuration file (not enabled) does not mention these configuration lines. Is it bad that the main site is doing that, or necessary to do SSL, or what? I read a bunch of Internet guides for configuring an SSL site in apache and none of them seem to mention it.
(The default site's SSL config I cobbled together is working btw, I included the ifmodule business)
View all comments
Show parent comment
1
u/mikeymikeymikec Jun 01 '26
Thanks for the informative responses, I think I'm in the same boat as you and u/Apprehensive-Tea1632 as my needs aren't so mission critical and I'd prefer as much feedback as possible if something is awry. I'll try commenting out the lines for the main site and restarting apache at a convenient moment.