Restart Apache 2 In Mac OS X

Posted on in Categories , last updated December 7, 2010

How do I restart the Apache 2 Web Server under Apple OS X UNIX operating systems using bash command prompt?

Open a terminal and than type the following command to restart the apache 2 web server:
$ sudo /usr/sbin/apachectl restart
OR
$ sudo apachectl -k restart
Sample outputs:

Restart Apache 2 Mac OS X
Restart Apache 2 Mac OS X

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.

1 comment

Leave a Comment