Error in apache2

Hello,
I installed apache2 but it seems tohave a problem cause I cannot make it start:

ranto@linux:~> sudo rcapache2 start
root's password:
redirecting to systemctl start apache2.service
Job for apache2.service failed. See "systemctl status apache2.service" and "journalctl -xn" for details.
ranto@linux:~> systemctl status apache2.service
apache2.service - The Apache Webserver
   Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled)
   Active: failed (Result: exit-code) since Fri 2015-01-30 23:48:48 BRST; 31s ago
  Process: 2396 ExecStop=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k graceful-stop (code=exited, status=1/FAILURE)
  Process: 2378 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k start (code=exited, status=1/FAILURE)
 Main PID: 2378 (code=exited, status=1/FAILURE)


Does anybody knows what is going on? I reinstalled apache and it remais the same.
I just installed tumbleweed (apache was installed over it)

As the error message states, you need to examine the logs:


journalctl -l | grep -i apache

and


sudo systemctl status apache2

They oughta tell you why it’s failing to start.

Also /var/log/apache2/error_log might tell you what the problem is - depending on the issue, you can just “less” it or “tail” it in another terminal window, for example:

sudo tail -f /var/log/apache2/error_log

and issue sudo systemctl start apache2 in another terminal window. CTRL+C to exit the tail.

Thank for the prompt answer!
I did what you told and corrected some issues but this one:


Jan 31 09:01:08 linux.site start_apache2[22528]: Invalid command 'which', perhaps misspelled or defined by a module not included in the server configuration

I looked for some “which” misplaced as a command in httpd.conf but couldn’t find.
Am I looking in the wrong place?

All right, I solved it, found the misspelled “which” and apache started ok. Thank you very much.