Apache problem when starts

Hello,

I am installing the Apache web server on Rocky Linux 10. When I check the status of the httpd, the result is:

● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; preset: disabled)
Active: active (running) since Mon 2025-07-07 12:44:16 CEST; 5s ago
Invocation: 4bdafd352517432182f80268013eee79
Docs: man:httpd.service(8)
Main PID: 1326 (httpd)
Status: “Started, listening on: port 80”
Tasks: 177 (limit: 22972)
Memory: 14.1M (peak: 14.2M)
CPU: 160ms
CGroup: /system.slice/httpd.service
├─1326 /usr/sbin/httpd -DFOREGROUND
├─1361 /usr/sbin/httpd -DFOREGROUND
├─1362 /usr/sbin/httpd -DFOREGROUND
├─1363 /usr/sbin/httpd -DFOREGROUND
└─1364 /usr/sbin/httpd -DFOREGROUND

Jul 07 12:43:16 rl10.srv.lan systemd[1]: Starting httpd.service - The Apache HTTP Server…
Jul 07 12:43:16 rl10.srv.lan (httpd)[1326]: httpd.service: Referenced but unset environment variable evaluates to an empty string: OPTIONS
Jul 07 12:44:16 rl10.srv.lan systemd[1]: Started httpd.service - The Apache HTTP Server.
Jul 07 12:44:16 rl10.srv.lan httpd[1326]: Server configured, listening on: port 80

I found a way of dealing with the problem " httpd.service: Referenced but unset environment variable evaluates to an empty string: OPTIONS".

Is it possible to solve it in order not to face it again?

Yes, you need to check your Apache configuration and fix it. Then it won’t appear again. Most likely something has been incorrectly configured under /etc/httpd.

Hello,

As I told you before, I fixed it, and below are the steps
1
vim /etc/systemd/system/httpd.service.d/override.conf

I add:

[Service]
ExecStart=
ExecStart=/usr/sbin/httpd -DFOREGROUND

Save and exit the editor

Reload systemd and restart Apache:
sudo systemctl daemon-reload
sudo systemctl restart httpd

I did a similar thing for MariaDB.

The question is, why do I need to make adjustments? That is not happening in previous versions, and I think it should be like that.

On a clean installation, this problem doesn’t exist. Perhaps you copied apache config from an older machine or different machine? That would potentially explain why it doesn’t work.

On mine, I just did:

dnf install -y httpd
systemctl enable --now httpd

and Apache works. The same for mariadb as well.

1 Like