Skip to main content

Posts

Showing posts from May 2, 2021

Apache Web Server - Mac OS X Start / Stop / Restart

  H ow do I start or stop Apache/Apache 2 web server using a shell prompt option under Apple OS X (macos) UNIX operating systems? The apachectl command act as Apache HTTP Server control interface. When you edit the Apache config file /etc/apache2/httpd.conf, you need to reload or restart the web server. Open the terminal application and type the following commands: To stop Apache web server, enter: sudo apachectl stop OR sudo apachectl -k stop To start Apache web server again, enter: sudo apachectl start OR sudo apachectl -k start To restart apache web server, enter: sudo apachectl restart OR sudo apachectl -k restart To run a configuration file syntax test sudo apachectl configtest To reload apache web server after editing the config file First edit the config file, run: $ sudo vi /etc/apache2/httpd.conf Make changes as per your needs. Close and save the file. To reload new changes, run: sudo apachectl graceful OR sudo apachectl -k graceful You can displays a brief status report b...