Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

$ service apache2 restart [fail]

I have installed Apache on my Ubuntu Server. For a special reason I have to enable mod_rewrite on it. So I have done this.

And in every Tutorial on the internet the last command is to restart apache. But when I do this the console prints [fail].

Can anyone help me here?

$ service apache2 restart   * Restarting web server apache2      [fail]  
like image 966
Miralem Cebic Avatar asked Jan 31 '14 11:01

Miralem Cebic


People also ask

Why my apache2 is not working?

If your system wasn't able to restart Apache2 you most likely got some form of an error message. In case you got a reply resembling either one of the output examples below, the service is most likely not properly installed on your system or some files are missing. Failed to restart apache2. service: Unit apache.


1 Answers

I had a similar problem, and for me it was about the logged in user not having privileges so instead of

service apache2 restart 

I had to do

sudo service apache2 restart 
like image 180
Sudarshan Avatar answered Sep 21 '22 00:09

Sudarshan