Friday, August 7, 2009

Start, Stop, Restart Apache HTTP Server on different Linux distributions

Switching from one Linux distribution to another I keep bumping into these minor differences. For instance, here is how you start\stop\restart Apache the different Linux distributions I work with.

Ubuntu (Debian)
/etc/init.d/apache2 restart
/etc/init.d/apache2 start
/etc/init.d/apache2 stop

Red Hat \ Fedora
/etc/init.d/httpd restart
/etc/init.d/httpd start
/etc/init.d/httpd stop

/sbin/service httpd restart
/sbin/service httpd start
/sbin/service httpd stop

Feel free to comment with ways to do this on other distributions.

1 comment:

Eric said...

in openSuse

/etc/init.d/apache2 start