You are not logged in.
Hello community!
Thanks for taking the time to read through this.
I had a long-time-running installation of apache, php-fpm and mariadb on my machine to develop websites. Therefor I modified the settings of apache so it runs as my user "myuser" and moved the root directory to /home/myuser/html, just to have simple access to all dev sites, etc. It worked for years, stable and steady. I start all services manually via bash script when I do dev work.
Since today apache refuses to start, saying
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; preset: disabled)
Drop-In: /etc/systemd/system/httpd.service.d
└─hardening.conf
Active: failed (Result: exit-code) since Tue 2025-09-30 20:09:58 CEST; 38min ago
Invocation: 7e4531c30d23438b94818f866a221c77
Docs: https://httpd.apache.org/docs/2.4/
Process: 5528 ExecStart=/usr/bin/httpd -D FOREGROUND -k start (code=exited, status=1/FAILURE)
Main PID: 5528 (code=exited, status=1/FAILURE)
Status: "Reading configuration..."
Mem peak: 1.7M
CPU: 29ms
Sep 30 20:09:58 worklap23-cm systemd[1]: Starting The Apache HTTP Server...
Sep 30 20:09:58 worklap23-cm httpd[5528]: AH00526: Syntax error on line 257 of /etc/httpd/conf/httpd.conf:
Sep 30 20:09:58 worklap23-cm httpd[5528]: DocumentRoot '/home/myuser/html' is not a directory, or is not readable
Sep 30 20:09:58 worklap23-cm systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Sep 30 20:09:58 worklap23-cm systemd[1]: httpd.service: Failed with result 'exit-code'.
Sep 30 20:09:58 worklap23-cm systemd[1]: Failed to start The Apache HTTP Server.
Here are the relevant lines for the conf file:
User myuser
Group myuser
...
DocumentRoot "/home/myuser/html"
<Directory "/home/myuser/html">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
and this are the permissions on the folders
ls -ld /home /home/myuser /home/myuser/html
drwxr-xr-x 7 myuser myuser 4096 20. Feb 2024 /home
drwx--x--x 48 myuser myuser 4096 30. Sep 21:02 /home/myuser
drwxrwxr-x 50 myuser myuser 4096 2. Sep 10:48 /home/myuser/html
I tried to solve this using AI, but those machines are too dumb to truly help. So no results so far. As mentioned: All has been working well for years. I have many upgrades / updates and all has been stable. Until today. I guess I did a system update along the way. Anyone who can help with natural intelligence?
Thanks a lot
Last edited by acm-i (2025-10-01 06:02:38)
Offline
What is in your /etc/systemd/system/httpd.service.d/hardening.conf file?
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Same here, impossible since yesterday.
[Service]
# These are the settings from service file `httpd.service`, providing some extra
# hardening and security. If this conflicts with your use case uncomment below and
# configure as required.
#NoNewPrivileges=on
#PrivateDevices=on
#PrivateTmp=on
#ProtectHome=on
Offline
Just downgraded Apache and it works perfectly now.
Since it’s just for local development, I’ll lock this version.
No idea why the latest version was failing, but at least everything runs fine again.
Offline
Well, at least it seems I'm not alone with this problem.
my hardening.conf file looks exactly the same.
When downgrading apache do I also need to downgrade php packages or just apache?
Maybe you can give me a hint how to do that _exactly_. I'm really not experienced doing such things.
::edit::
it was as simple as
suod pacman -U file:///var/cache/pacman/pkg/apache-2.4.63-3-x86_64.pkg.tar.zst
to revert to the previous version of apache. Now it's working again.
::edit end::
Thanks!
Last edited by acm-i (2025-10-01 05:58:45)
Offline
Offline
Thanks!
I already had found this, but I just was unsure about all the related stuff (php...)
Offline
How can this thread set to solved? Can I do that?
:: edit ::
done
:: edit end ::
Last edited by acm-i (2025-10-01 06:03:08)
Offline
Same here, impossible since yesterday.
[Service] # These are the settings from service file `httpd.service`, providing some extra # hardening and security. If this conflicts with your use case uncomment below and # configure as required. #NoNewPrivileges=on #PrivateDevices=on #PrivateTmp=on #ProtectHome=on
Uncomment "ProtectHome" and change the value to 'no' or 'read-only'.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
mavrick wrote:Same here, impossible since yesterday.
[Service] # These are the settings from service file `httpd.service`, providing some extra # hardening and security. If this conflicts with your use case uncomment below and # configure as required. #NoNewPrivileges=on #PrivateDevices=on #PrivateTmp=on #ProtectHome=on
Uncomment "ProtectHome" and change the value to 'no' or 'read-only'.
I upgraded to the latest version to reproduce my bug. I set ProtectHome=false (the docs say it accepts a boolean or values like read-only, tmpfs). Then I ran sudo systemctl daemon-reload and restarted the server — everything works perfectly now, thanks!
Offline
Thank you for asking this question. I've been reading the change logs, re-checking the filesystem, and scratching my head wondering what's going on .
I thought an apache root directory in a user's $HOME was a pretty standard practice. I'm surprised there aren't more hits on this issue.
I see the apache archlinux wiki has been updated.
Offline