How to stop apache

How to stop apache

The stop and start of Apache in Unix-like systems is carried out by means of the command line. As for Windows, the server can be stopped by means of the special graphic or console httpd utility. If you use ready assembly of XAMPP, then shutdown of Apache is carried out via the control panel.

Instruction

1. For Apache stop in Linux open the Terminal ("Applications" - "Standard" - "Terminal") and enter a command:

. / apachectl stop

For repeated start it is enough to enter similar request, but with the start parameter:

. / apachectl start

For an immediate stop of process it is possible to use a key – k:

apachectl – k stop

After receiving this signal the parent process immediately destroys all child processes, and then and itself completes the work.

2. For soft restart of Apache use the graceful parameter, for tough restart - restart:

apachectl – k graceful

apachectl – k restart

If above-mentioned commands do not work, then try to complete the work with the server as the kill or killall commands, however you remember that each their application inflicts defeat over process.

3. In the Windows system pass into the command line ("Start-up" - "Standard" - "Command line") and enter:

cd of "C:\путь до установленного сервера\bin"

httpd – k shutdown

4. For automatic completion of work of Apache create the Stop.bat file (the right mouse button – "Create") and write:

@echo off

C:

cd \put_do_apache\bin

start Apache.exe – k shutdown

Save all changes. Now you will be able to complete the work of service, having double-clicked on this file.

5. If you use assembly of XAMPP as the local server, then completion of work of Apache can be carried out through Control Panel. Pass into the Start menu - "All programs" - "XAMPP for Windows" - "XAMPP Control Panel". In the opened window opposite to the Apache point click Stop. For restart the Start button is used. If you want to execute start in the mode of service, then do not forget to check opposite to the SVC point.

6. If you use ready assembly of Denwer, then for a stop of operation of the server use Stop Server label on a desktop. For restart double-click on Restart Server label.

Author: «MirrorInfo» Dream Team


Print