systemd: apache2.service: Main process exited, code=exited, status=1/FAILURE — Job for apache2.service failed because the control process exited with error code
systemd couldn't start Apache — the real error is in the journal or apachectl configtest.
apache2.service: Failed with result 'exit-code'Job for apache2.service failed because the control process exited with error codehttpd.service: Main process exited, code=exited, status=1/FAILUREFailed to start The Apache HTTP Serverapache2.service: Control process exited, code=exited status=1 Meaning
Run sudo apachectl configtest and sudo journalctl -xeu apache2 (or httpd on RHEL). Typical reasons: syntax error, port in use (AH00072), missing log directory (AH00015), missing module/cert file, or SELinux denial.
Common causes
- Config syntax error
- Port already in use
- Missing SSL certificate/key files
- Log directory problems
- SELinux/AppArmor denial
⚡ Quick fix
sudo apachectl configtestsudo journalctl -xeu apache2 --no-pager | tail -50- Fix the reported AH code and restart
Detailed fix by platform
Linux
sudo apachectl configtest; sudo journalctl -xeu apache2 --no-pager | tail -40
How to diagnose
- Test — configtest output?
- Journal — AH code?
- Port — Free?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- AH00015: Unable to open logs Apache: AH00091: apache2: could not open error log file /var/log/apache2/error.log. AH00015: Unable to open logs (Permission denied)
- AH00037: Symbolic link not allowed or link target not accessible Apache: [core:error] AH00037: Symbolic link not allowed or link target not accessible: /var/www/html/current
- AH00072: make_sock: could not bind to address 0.0.0.0:80 Apache: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80 / AH00015: Unable to open logs
Most viewed in Nginx / Apache
- nginx: [emerg] unknown directive Nginx: nginx: [emerg] unknown directive "x" in /etc/nginx/sites-enabled/x:12 — configuration file test failed
- upstream timed out Nginx: upstream timed out (110: Connection timed out) while reading response header from upstream
- AH00898: Error reading from remote server (502 Proxy Error) Apache: [proxy_http:error] AH01102: error reading status line from remote server 127.0.0.1:3000 / AH00898: Error reading from remote server returned by /api
Other ways to find it
Where this error sits
Origin: Edge & web server. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 5 Nov 2026