How do I restart Apache 2 web server under Apple Mac OS X UNIX operating systems?
You need to use the apachectl command which nothing but a front end to the Apache 2 (HTTP) server. It is designed to help the administrator control the functioning of the Apache httpd daemon.
Adblock detected 😱
My website is made possible by displaying online advertisements to my visitors. I get it! Ads are annoying but they help keep this website running. It is hard to keep the site running and producing new content when so many people block ads. Please consider donating money to the nixCraft via PayPal/Bitcoin, or become a supporter using Patreon.
Open a terminal and use the following commands.
Task: Restart Apache2 Under Mac OS X
sudoapachectl-k restart
sudo apachectl -k restart
Sample session: Fig.01: Restarting Apache 2 under Mac Os X Using command line options The second command netstat -at | grep LISTEN verifies that port 80 (HTTP) is open and working fine.
The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.
2 comment
What does the ‘-k’ stands for?
-k tells to process to gracefully stop, start or restart
What does the ‘-k’ stands for?
-k tells to process to gracefully stop, start or restart