0

I have seen many threads about this problem but the problem doesn't solved.

I'm trying to start httpd.service by this command :

$ sudo systemctl start httpd.service

Error :

Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.

P.S :

$ journalctl -xn

The output of above command is :

-- Logs begin at Sat 2014-03-29 22:42:48 IRDT, end at Sat 2014-05-10 23:58:05 IRDT. --
May 10 23:55:51 localhost systemd[1]: Unit httpd.service entered failed state.
May 10 23:55:51 localhost sudo[18583]: pam_unix(sudo:session): session closed for user root
May 10 23:58:05 localhost sudo[19575]: kamix : TTY=pts/1 ; PWD=/home/kamix ; USER=root ; COM
May 10 23:58:05 localhost sudo[19575]: pam_unix(sudo:session): session opened for user root 
May 10 23:58:05 localhost systemd[1]: Starting Apache Web Server...
-- Subject: Unit httpd.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit httpd.service has begun starting up.
May 10 23:58:05 localhost apachectl[19578]: httpd: Syntax error on line 59 of /etc/httpd/con
May 10 23:58:05 localhost sudo[19575]: pam_unix(sudo:session): session closed for user root
May 10 23:58:05 localhost systemd[1]: httpd.service: control process exited, code=exited sta
May 10 23:58:05 localhost systemd[1]: Failed to start Apache Web Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit httpd.service has failed.
-- 
-- The result is failed.
  • 1
    httpd: Syntax error on line 59 of /etc/httpd/con Post your config. – mid_kid May 10 '14 at 15:11
  • Even if your system uses systemd, you can still do a apachectl configtest to debug configuration problems. – Bruce Ediger May 10 '14 at 15:20
  • @mid_kid /etc/httpd/conf/httpd.conf content is here pastebin.com/1K5nn9iZ – Hamed Kamrava May 10 '14 at 15:32
  • @BruceEdiger Your cammand same error : httpd: Syntax error on line 59 of /etc/httpd/conf/httpd.conf: Cannot load modules/mod_authn_default.so into server: /etc/httpd/modules/mod_authn_default.so – Hamed Kamrava May 10 '14 at 15:33
1

Based on the output of apachectl configtest, my Arch linux server's files, and a little googling, it appears that there's an issue when you upgrade Apache from 2.2 to 2.4. I vaguely remember having this problem last year sometime. I'm going to advise saving httpd.conf somewhere, doing pacman -R apache, and then pacman -S apache. Use some difference tool to compare the Apache 2.4 /etc/httpd/conf/httpd.conf with the one you saved, and make any necessary changes to the new httpd.conf. There will likely be only a few necessary changes. I personally got rid of some named virtual servers that I didn't need.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.