Cara untuk mengatasi error dari httpd (apache2) dengan pesan kesalahan

[root@surbakti tommy]# service httpd start
Redirecting to /bin/systemctl start  httpd.service
Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.

# systemctl status httpd.service

httpd.service - The Apache HTTP Server
	  Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled)
	  Active: failed (Result: exit-code) since Mon 2013-03-11 11:16:40 WIT; 18s ago
	 Process: 7155 ExecStop=/usr/sbin/httpd $OPTIONS -k graceful-stop (code=exited, status=0/SUCCESS)
	 Process: 7153 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 
Mar 11 11:16:40 surbakti systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Mar 11 11:16:40 surbakti httpd[7155]: httpd (no pid file) not running
Mar 11 11:16:40 surbakti systemd[1]: Failed to start The Apache HTTP Server.
Mar 11 11:16:40 surbakti systemd[1]: Unit httpd.service entered failed state

# tail -f /var/log/httpd/error_log

AH00016: Configuration Failed
[Mon Mar 11 11:18:50.759011 2013] [suexec:notice] [pid 7443] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Mar 11 11:18:51.374462 2013] [unique_id:alert] [pid 7443] (EAI 2)Name or service not known: AH01564: unable to find IPv4 address of "surbakti"

dari error terakhir kelihatan bahwa hostname yang saya gunakan surbakti tidak memiliki IPv4, untuk mengatasinya buka file /etc/hosts dan tambahkan baris dibawah ini

127.0.0.1	surbakti	surbakti

sekarang coba restart kembali apache web server anda

[root@surbakti tommy]# service httpd restart
Redirecting to /bin/systemctl restart  httpd.service

berjalan dengan sempurna :).

Leave a comment

Your email address will not be published. Required fields are marked *