$ service apache2 restart [fail]

Miralem Cebic picture Miralem Cebic · Jan 31, 2014 · Viewed 95.3k times · Source

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] 

Answer

Sudarshan picture Sudarshan · Jul 12, 2014

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