How To Stop Apache

Table of contents:

How To Stop Apache
How To Stop Apache

Video: How To Stop Apache

Video: How To Stop Apache
Video: Stop Tomcat Server 2024, April
Anonim

Stopping and starting Apache on Unix-like systems is done using the command line. As far as Windows is concerned, the server can be stopped using a special graphical or console utility called httpd. If you are using an off-the-shelf XAMPP build, Apache can be disabled through the control panel.

How to stop apache
How to stop apache

Instructions

Step 1

To stop Apache on Linux open Terminal (Applications - Standard - Terminal) and enter the command:

./apachectl stop

To restart, it is enough to enter a similar request, but with the start parameter:

./apachectl start

To stop the process immediately, you can use the –k switch:

apachectl –k stop

Upon receiving this signal, the parent process immediately kills all child processes, and then exits itself.

Step 2

For a soft restart of Apache, use the graceful parameter, for a hard restart, use restart:

apachectl –k graceful

apachectl –k restart

If the above commands do not work, then try shutting down the server with the kill or killall commands, but remember that each time they are used, the process is defeated.

Step 3

In Windows, go to Command Prompt (Start - Accessories - Command Prompt) and type:

cd "C: / path to the installed server / bin"

httpd –k shutdown

Step 4

To automatically shutdown Apache, create a Stop.bat file (right mouse button - New) and write:

@echo off

C:

cd / path_to_apache / bin

start Apache.exe –k shutdown

Save all changes. Now you can shut down the service by double clicking on this file.

Step 5

If you are using the XAMPP build as a local server, then Apache can be shut down through the Control Panel. Go to Start Menu - All Programs - XAMPP for Windows - XAMPP Control Panel. In the window that opens, opposite the Apache item, click the Stop button. To restart, use the Start button. If you want to start in service mode, do not forget to check the box next to Svc.

Step 6

If you are using a ready-made assembly of Denwer, then to stop the server operation, use the Stop Server shortcut on the desktop. To restart, double click on the Restart Server shortcut.

Recommended: