Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can we reset apache2

Tags:

apache2

By mistake I have applied the command,

sudo rm -rf /etc/init.d/apache2 restart

after that i can't run apache2

How can I solve this?

like image 994
user1059150 Avatar asked Apr 15 '26 12:04

user1059150


1 Answers

Reinstall and start Apache with the commands below:

sudo apt-get purge apache2
sudo apt-get install apache2
sudo service apache2 start

apt purge uninstalls the specified app (in this case, apache)

apt install installs the specified app (in this case, apache)

service start starts the specified app (in this case, apache)

like image 172
Dhivin Avatar answered Apr 18 '26 06:04

Dhivin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!