Public bug reported:

The md module in Apache for Managed Domains relies on storing its
certificates in /etc/apache2/md by default. However, the SystemD service
unit for apache2 has been hardened in Ubuntu 26.04, preventing Apache2
from writing to this location.

To reproduce:
1. Enable ssl and md with sudo a2enmod ssl and a2enmod md
2. Create a site in /etc/apache2/sites-available with:

MDomain example.com
<VirtualHost *:443>
        ServerName example.com
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www/html

        SSLEngine on
</VirtualHost>

3. Restart apache2 service
4. Observe the failure to start

Log in /var/log/apache2/error.log contains:
[md:error] [pid 2885:tid 2885] (30)Read-only file system: AH10046: setup store 
for /etc/apache2/md


To fix this, I created an override for apache2.service with:

[Service]
ReadWritePaths=/etc/apache2/md

And I created the directory /etc/apache2/md

** Affects: apache2 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2163358

Title:
  Broken md module due to restriction in apache2.service file

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/2163358/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to