logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Apache won't start - AlmaLinux 10
Author
jeffshead



Joined: 07 Jan 2010
Posts: 3

PostPosted: Mon 25 Aug '25 3:59    Post subject: Apache won't start - AlmaLinux 10 Reply with quote

I need some help tracking down the reason why Apache won't start on a new server install. I set it up the same way I have all other AlmaLinux 8-9 servers in the past but I can't find a reason for the failure. I can't find any useful info in any of the logs.

Here's what I get when I try to start Apache:

Code:

[root@ncd ~]# systemctl restart httpd
Job for httpd.service failed because the control process exited with error code.
See "systemctl status httpd.service" and "journalctl -xeu httpd.service" for details.
[root@ncd ~]# systemctl status httpd.service
× httpd.service - The Apache HTTP Server
     Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; preset: disabled)
    Drop-In: /etc/systemd/system/httpd.service.d
             └─php-fpm.conf
     Active: failed (Result: exit-code) since Sun 2025-08-24 21:54:26 EDT; 30s ago
 Invocation: 442fe177ec1b486395e56d1c932a227e
       Docs: man:httpd.service(8)
    Process: 4066 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
   Main PID: 4066 (code=exited, status=1/FAILURE)
     Status: "Reading configuration..."
   Mem peak: 3.1M
        CPU: 144ms

Aug 24 21:54:25 ncdot.cc systemd[1]: Starting httpd.service - The Apache HTTP Server...
Aug 24 21:54:26 ncdot.cc (httpd)[4066]: httpd.service: Referenced but unset environment variable evaluates to an empty string: OPTIONS
Aug 24 21:54:26 ncdot.cc systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Aug 24 21:54:26 ncdot.cc systemd[1]: httpd.service: Failed with result 'exit-code'.
Aug 24 21:54:26 ncdot.cc systemd[1]: Failed to start httpd.service - The Apache HTTP Server.
[root@ncd ~]#

Code:
[root@ncd ~]# apachectl configtest
Syntax OK
[root@ncd ~]#


I did find this in the /var/log/httpd/error_log:
Code:
(30)Read-only file system: AH00091: httpd: could not open error log file /home/ncdot/logs/error.log.
AH00015: Unable to open logs


Anyone have any ideas where I should look?

UPDATE:
I have triple checked all ownership and permissions on all files/directories and they are identicalto all of the other AlmaLinux 8 & 9 servers but, the following path for the log file does not work on the AlmaLinux 10 server:
Code:
ErrorLog /home/ncdot/logs/error.log


If I change the path to...
Code:
ErrorLog /var/log/httpd/error.log

...Apache starts.

Has something changed in v10 that would cause the original log file path to not work?


Last edited by jeffshead on Mon 25 Aug '25 13:09; edited 4 times in total
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7433
Location: EU, Germany, Next to Hamburg

PostPosted: Mon 25 Aug '25 9:12    Post subject: Reply with quote

Somewhere in your config, you defined a log with the path "/home/ncdot/logs/error.log". Does that path exist? Is the path readable for the Apache user? Can the Apache user write that file?
Back to top
jeffshead



Joined: 07 Jan 2010
Posts: 3

PostPosted: Mon 25 Aug '25 13:39    Post subject: Reply with quote

James Blond wrote:
Somewhere in your config, you defined a log with the path "/home/ncdot/logs/error.log". Does that path exist? Is the path readable for the Apache user? Can the Apache user write that file?

Apparently not, for whatever reason. How do I test? I don't understand why it works on several other servers but not this one.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7433
Location: EU, Germany, Next to Hamburg

PostPosted: Wed 27 Aug '25 10:11    Post subject: Reply with quote

I don't know about Red Hat distros. In most distros, you run

apachectl -S

The config test is just apachectl -t while the -S also tests the virtual hosts, too.
Back to top


Reply to topic   Topic: Apache won't start - AlmaLinux 10 View previous topic :: View next topic
Post new topic   Forum Index -> Apache