This module is one of the default modules that aims at handling the control functions of apache server. It enables and facilitates the required control functions that are to be performed in the Apache server. Let us see, the working and purpose of control functions and how this modules involved in handling those control functions of apache server.
The help command acts as a brief user guide that leads the users how to handle and use this particular module.
The syntax for help command under the Apache control is shown below:
dapperstrano ApacheControl help
The syntax for declaring the help command is not case sensitive which is an added advantage. The help command also lists out the alternative parameters that can be used in declaration. The following screenshot visualize you about the help command under Apache Control.
kevells@corp:/# dapperstrano ApacheControl help
******************************
This command is part of Default Modules and handles Apache Server Control Functions.
ApacheControl, apachecontrol, apachectl
- start
Start the Apache server
example: dapperstrano apachecontrol start
example: dapperstrano apachecontrol start --yes --guess
example: dapperstrano apachecontrol start --yes --apache-command="apache2"
- stop
Stop the Apache server
example: dapperstrano apachecontrol stop
example: dapperstrano apachecontrol stop --yes --guess
example: dapperstrano apachecontrol stop --yes --apache-command="apache2"
- restart
Restart the Apache server
example: dapperstrano apachecontrol restart
example: dapperstrano apachecontrol restart --yes --guess
example: dapperstrano apachecontrol restart --yes --apache-command="apache2"
- reload
Reloads the Apache server configuration without restarting
example: dapperstrano apachecontrol reload
example: dapperstrano apachecontrol reload --yes --guess
example: dapperstrano apachecontrol reload --yes --apache-command="apache2"
------------------------------
End Help
******************************
The four basic control functions included in the Apache server are : * Start * Stop * Restart * Reload
There is three possible ways in defining a control functions. For example, if we take start function, it can be defined in three different ways as required by the user as shown below.
dapperstrano ApacheControl start
or
dapperstrano ApacheControl start --yes --guess
or
dapperstrano ApacheControl start --yes --apache-command="apache2"
Let us see the usage of three different syntax in declaring in upcoming topics.
The following are the alternative parameters that can be defined in declarations: ApacheControl, apachecontrol, apachectl
If the user wish to start the apache control function, the can use the following syntaxes as shown:
dapperstrano ApacheControl start
(This is the first type of syntax in defining a control functions for apche server)
After inputting the command as above, the following steps are performed:
Step 1: Do you want to start Apache? (Y/N). The user have to specify Y or N.
Step 2: What is the apache service name? (0) apache2 (1) httpd
The user should specify whether 0 or 1 as per the requirement.
After getting the input of the apache service name, it will starts the process.
The following screenshot depicts the start process pictorially.
kevells@corp:/# dapperstrano apachecontrol start
Do you want to Start Apache? (Y/N)
y
What is the apache service name?
(0) apache2
(1) httpd
0
Starting Apache...
* Starting web server apache2
*
******************************
1Apache Controller Finished
******************************
If the user wish to stop the apache control function, the can use the following syntaxes as shown:
dapperstrano apachecontrol stop --yes --guess
(This is the second type of syntax in defining a control functions for apache server)
The guess option can be used to perform a default values of the particular defined functions.
For ubuntu the apche2 is the default value.
For Cent OS httpd is the default value.
The following screenshot depicts you about the stop function and purpose of guess options pictorially.
kevells@corp:/# dapperstrano apachecontrol stop --yes --guess
Stopping Apache...
* Stopping web server apache2
*
******************************
1Apache Controller Finished
******************************
If the user wish to restart the apache control function, the can use the following syntaxes as shown:
dapperstrano apachecontrol restart --yes --apache-command="apache2"
(This is the third type of syntax in defining a control functions for apche server)
The user can use this third type of syntax to specify the value of the required apache command. The screen shot as shown below depicts this third type of syntax and process of restarting a function pictorially.
kevells@corp:/# dapperstrano apachecontrol restart --yes --apache-command="apache2"
Restarting Apache...
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globa lly to suppress this message
* Restarting web server apache2
....done.
******************************
1Apache Controller Finished
******************************
If the user wish to reload the apache control function, the can use the following syntaxes as shown:
dapperstrano apachecontrol reload
or
dapperstrano apachecontrol --yes --guess
or
dapperstrano apachecontrol --yes --apache-command="apache2"
The reload function performs reloading the apache server without restarting.
This file can be edited directly through the Web. Anyone can update and fix errors in this document with few clicks -- no downloads needed.
For an introduction to the documentation format please see the reST primer.