apache fails to start because of syntax error in /etc/httpd/conf.d/autoindex.conf
Issue
- apache fails to start because of syntax error in /etc/httpd/conf.d/autoindex.conf
- Job for httpd.service failed. See "systemctl status httpd.service" and "journalctl -xe" for details
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled)
Active: failed (Result: exit-code) since Tue 2015-03-31 18:00:01 IST; 6s ago
Process: 2167 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 2167 (code=exited, status=1/FAILURE)
Mar 31 18:00:01 localhost httpd[2167]: AH00526: Syntax error on line 21 of /etc/httpd/conf.d/autoindex.conf:
Mar 31 18:00:01 localhost httpd[2167]: Invalid command 'lias', perhaps misspelled or defined by a module not included in the server configuration
Mar 31 18:00:01 localhost systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Mar 31 18:00:01 localhost systemd[1]: Failed to start The Apache HTTP Server.
Mar 31 18:00:01 localhost systemd[1]: Unit httpd.service entered failed state.
Mar 31 18:00:01 localhost systemd[1]: httpd.service failed.
- httpd fails with the syntax error
[root@cacti init.d]# systemctl status -l httpd.service
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
Active: failed (Result: exit-code) since Thu 2015-07-16 14:24:51 EDT; 15h ago
Process: 7847 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 7846 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 7846 (code=exited, status=1/FAILURE)
CGroup: /system.slice/httpd.service
Jul 16 14:24:51 abc.xyz.com systemd[1]: Starting The Apache HTTP Server...
Jul 16 14:24:51 abc.xyz.com httpd[7846]: AH00526: Syntax error on line 17 of /etc/httpd/conf.d/cacti.conf:
Jul 16 14:24:51 abc.xyz.com httpd[7846]: Argument for 'Require all' must be 'granted' or 'denied'
Jul 16 14:24:51 abc.xyz.com systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jul 16 14:24:51 abc.xyz.com kill[7847]: kill: cannot find process ""
Jul 16 14:24:51 abc.xyz.com systemd[1]: httpd.service: control process exited, code=exited status=1
Jul 16 14:24:51 abc.xyz.com systemd[1]: Failed to start The Apache HTTP Server.
Jul 16 14:24:51 abc.xyz.com systemd[1]: Unit httpd.service entered failed state.
Environment
- Red Hat Enterpise Linux (RHEL) 7
- Apache httpd
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.