The quickest way to check whether the server is running is to try this command: ps auxw | grep httpd in .NET

Generate PDF-417 2d barcode in .NET The quickest way to check whether the server is running is to try this command: ps auxw | grep httpd
The quickest way to check whether the server is running is to try this command: ps auxw | grep httpd
PDF-417 2d Barcode Decoder In .NET Framework
Using Barcode Control SDK for .NET framework Control to generate, create, read, scan barcode image in Visual Studio .NET applications.
This command uses the ps utility to list all the processes that are in the process queue, and then pipes this output to the grep program grep searches the output
PDF 417 Printer In .NET Framework
Using Barcode maker for .NET framework Control to generate, create PDF417 image in VS .NET applications.
3 Getting Apache Up and Running
PDF 417 Reader In .NET
Using Barcode recognizer for .NET Control to read, scan read, scan image in .NET applications.
for lines that match the keyword httpd, and then displays each matching line If you see one line with the word root in it, that s your primary Apache server process Note that when the server starts, it creates a number of child processes to handle the requests If you started Apache as the root user, the parent process continues to run as root, while the children change to the user as instructed in the httpdconf file If you are running Apache on Linux, you can create the script shown in Listing 3-2 and keep it in /etc/rcd/initd/ directory This script allows you to automatically start and stop Apache when you reboot the system
Make Bar Code In .NET
Using Barcode drawer for VS .NET Control to generate, create bar code image in VS .NET applications.
Listing 3-2: The httpd script
Bar Code Reader In .NET
Using Barcode recognizer for .NET Control to read, scan read, scan image in VS .NET applications.
#!/bin/sh # # httpd This shell script starts and stops the Apache server # It takes an argument start or stop to receptively start and # stop the server process # # Notes: You might have to change the path information used # in the script to reflect your system s configuration # APACHECTL=/usr/local/apache/bin/apachectl [ -f $APACHECTL ] || exit 0 # See how the script was called case $1 in start) # Start daemons echo -n Starting httpd: $APACHECTL start touch /var/lock/subsys/httpd echo ;; stop) # Stop daemons echo -n Shutting down httpd: $APACHECTL stop echo done rm -f /var/lock/subsys/httpd ;; *) echo Usage: httpd {start|stop} exit 1 esac exit 0
PDF417 Drawer In C#
Using Barcode encoder for Visual Studio .NET Control to generate, create PDF417 image in VS .NET applications.
Part I Getting Started
Make PDF417 In VS .NET
Using Barcode encoder for ASP.NET Control to generate, create PDF417 image in ASP.NET applications.
To start Apache automatically when you boot up your system, simply run this command once: ln -s /etc/rcd/initd/httpd /etc/rcd/rc3d/S99httpd This command creates a special link called S99httpd in the /etc/rcd/rc3d (run-level 3) directory that links to /etc/rcd/initd/httpd script When your system boots up, this script will be executed with the start argument and Apache will start automatically
Generating PDF 417 In Visual Basic .NET
Using Barcode printer for .NET Control to generate, create PDF-417 2d barcode image in VS .NET applications.
Restarting Apache
Encode Bar Code In VS .NET
Using Barcode printer for VS .NET Control to generate, create barcode image in .NET framework applications.
To restart the Apache server run /usr/local/apache/bin/apachectl restart command You can also use the kill command as follows:
Draw Barcode In .NET Framework
Using Barcode creator for .NET Control to generate, create barcode image in VS .NET applications.
kill -HUP cat /usr/local/apache/logs/httpdpid
Bar Code Printer In Visual Studio .NET
Using Barcode printer for .NET framework Control to generate, create barcode image in Visual Studio .NET applications.
When restarted with apachectl restart or by using the HUP signal with kill, the parent Apache process (run as root user) kills all its children, reads the configuration file, and restarts a new generation of children as needed
Royal Mail Barcode Maker In Visual Studio .NET
Using Barcode printer for VS .NET Control to generate, create British Royal Mail 4-State Customer Code image in VS .NET applications.
Note
Barcode Creator In VB.NET
Using Barcode encoder for Visual Studio .NET Control to generate, create bar code image in .NET applications.
This type of restart is sudden to the Web clients that were promised service by the then-alive child processes So, you might want to consider using graceful with apachectl instead of the restart option, and WINCH instead of HUP signal with the kill command In both cases, the parent Apache process will advise its child processes to finish the current request and then to terminate so that it can reread the configuration file and restart a new batch of children This might take some time on a busy site
Barcode Maker In Visual C#.NET
Using Barcode drawer for .NET framework Control to generate, create bar code image in .NET framework applications.
Stopping Apache
Encoding Code 128 Code Set A In Java
Using Barcode generation for Java Control to generate, create Code 128 Code Set A image in Java applications.
You can automatically stop Apache when the system reboots, or manually stop it at any time These two methods of stopping Apache are discussed in the following sections
Generating GTIN - 12 In Visual Basic .NET
Using Barcode generation for .NET framework Control to generate, create GTIN - 12 image in .NET applications.
Stopping Apache automatically
Print Code 128 Code Set B In Visual Studio .NET
Using Barcode creation for ASP.NET Control to generate, create Code 128 image in ASP.NET applications.
To terminate Apache automatically when the system is being rebooted, run this command once:
Data Matrix ECC200 Encoder In Visual C#.NET
Using Barcode drawer for .NET Control to generate, create Data Matrix image in Visual Studio .NET applications.
ln -s /etc/rcd/initd/httpd /etc/rcd/rc3d/K99httpd
Make Data Matrix In Visual Basic .NET
Using Barcode drawer for Visual Studio .NET Control to generate, create ECC200 image in .NET framework applications.
This command ensures that the httpd script is run with the stop argument when the system shuts down
Decoding DataMatrix In .NET Framework
Using Barcode scanner for VS .NET Control to read, scan read, scan image in .NET framework applications.
3 Getting Apache Up and Running
Stopping Apache server manually
To stop the Apache server, run the /usr/local/apache/bin/apachectl stop command Apache server also makes it convenient for you to find the PID of the root Web server process The PID is written to a file assigned to the PidFile directive This PID is for the primary httpd process Do not attempt to kill the child processes manually one by one because the parent process will recreate them as needed Another way to stop the Apache server is to run:
kill -TERM cat /usr/local/apache/logs/httpdpid
This command runs the kill command with -TERM signal (that is, -9) for the process ID returned by the cat /usr/local/apache/logs/httpdpid (that is, cat %PidFile%) command