Monday, April 15, 2013

Restart Apache in all Linux distributions

Restart Apache

Ubuntu

service apache2 restart
/etc/init.d/apache2 restart
apache2ctl restart

CentOS

/etc/init.d/httpd restart 

service httpd restart
/sbin/service httpd restart

Debian

service apache2 restart
/etc/init.d/apache2 restart 
apache2ctl restart

Suse

/usr/sbin/rcapache2 restart
apache2ctl restart

Fedora

apachectl restart
/sbin/service httpd restart

RedHat

/etc/init.d/httpd status
service httpd restart
/usr/local/apache2/bin/apachectl restart

2 comments:

  1. I usually try to use apachectl or apache2ctl first if I'm not sure where I am.

    ReplyDelete