How to restart Apache in Mac OS X Server

posted: Wednesday 27 January 2010 by Tavis J. Hampton in: Web Hosting VPS & Dedicated Web servers

Apache Software Foundation LogoQuestion: How do I restart Apache HTTP Server on a Mac OS X server?

Answer: Linux other Unix-based servers, you can start and stop Apache from the command line. If you are familiar with Redhat-based systems, then you are used to logging in and then using “su” to become Root. Mac OS Xrelies on “sudo” like many Debian-based systems (such as Ubuntu).

The command for Apache in Mac OS X is “apachectl” (Apache control). To restart Apache, type the following:

$ sudo apachectl restart

To stop Apache, enter:

$ sudo apachectl -k stop

And to start Apache again, type:

$ sudo apachectl -k start

After entering a command with “sudo” you will be prompted for your password. Enter it and continue. You will still need to use “sudo” for each command run as Root, but it will not ask you for the password again until you have stopped using it for a period of time in that session.

Source: nixCraft

1 stelle2 stelle3 stelle4 stelle5 stelle (no votes)
share this 0 comments

Related posts

Server OS Tips del 30 Jul 2010
Server Backup Tips del 30 Jul 2010
Server Hardware Tips del 28 Jul 2010
Server Maintenance Tips del 28 Jul 2010

Related tags

Be the first to add a comment to this article.

Your email address is required but won't be displayed.
Leave a comment

Register to reserve your nickname accross all the blogs in the Blogo network and to upload your avatar. If you already are registered, login to user your nickname.

Yes No

Comment preview

Network Blogo