Title: Theory / Unimportant / CS / Softw / Server / Apache / command
Tags: fromCommandLine hasNotNewEffectReturnsMeaning fromCommand some_instruction computer_to_instruction FromVariables
On every note of this deck, unless a note says otherwise:
Chapter: https://httpd.apache.org/docs/2.4/en/programs/httpd.html

Instruction: httpd
Page: https://httpd.apache.org/docs/2.4/en/invoking.html
Effect: A daemon, whose children listen/answer requests
Section: How Apache start

Instruction: apachectl
Page: https://httpd.apache.org/docs/2.4/en/invoking.html
Effect: Either:
-sets environments variables, and calls httpd, passing its arguments
-helps control httpd's running daemon
Section: How Apache start

Question: Port's is below 1024.
Answer: httpd's should have root privileges
Page: https://httpd.apache.org/docs/2.4/en/invoking.html
Section: How Apache start
Context: HTTPD

Effect: Set the initial value for the ServerRoot directive to serverroot.
Context: httpd
Chapter: https://httpd.apache.org/docs/2.4/en/programs/httpd.html
Abbreviation: -d serverroot
Extra: This can be overridden by the ServerRoot directive in the configuration file.
The default is /usr/local/apache2.

Effect: Uses the directives in the file foo on startup. If config does not begin with a /, then it is taken to be a path relative to the ServerRoot. The default is conf/httpd.conf.
Context: httpd
Chapter: https://httpd.apache.org/docs/2.4/en/programs/httpd.html
Abbreviation: -f foo
Extra: default: httpd.conf

Effect: Process the configuration directive before reading config files.
Context: httpd
Chapter: https://httpd.apache.org/docs/2.4/en/programs/httpd.html
Abbreviation: -C directive

Effect: Process the configuration directive after reading config files.
Context: httpd
Chapter: https://httpd.apache.org/docs/2.4/en/programs/httpd.html
Abbreviation: -c directive

Effect: Sets a configuration parameter which can be used with <IfDefine> sections in the configuration files to conditionally skip or process commands at server startup and restart. Also can be used to set certain less-common startup parameters including -DNO_DETACH (prevent the parent from forking) and -DFOREGROUND (prevent the parent from calling setsid() et al).
Context: httpd
Chapter: https://httpd.apache.org/docs/2.4/en/programs/httpd.html
Abbreviation: -D foo

Effect: Send error messages during server startup to file.
Context: httpd
Chapter: https://httpd.apache.org/docs/2.4/en/programs/httpd.html
Abbreviation: -E file

Fla: -h
Effect: Output a short summary of available command line options.
Prefix: httpd

Fla: -L
Effect: Output a list of directives provided by static modules, together with expected arguments and places where the directive is valid. Directives provided by shared modules are not listed.
Prefix: httpd

Fla: -M
Effect: Dump a list of loaded Static and Shared Modules.
Prefix: httpd

Fla: -S
Effect: Show the settings as parsed from the config file (currently only shows the virtualhost settings).
Prefix: httpd

Effect: Skip document root check at startup/restart.
Context: httpd
Chapter: https://httpd.apache.org/docs/2.4/en/programs/httpd.html
Abbreviation: -T (Available in 2.3.8 and later)

Fla: -v
Effect: Print the version of httpd, and then exit.
Prefix: httpd

Fla: -X
Effect: Run httpd in debug mode. Only one worker will be started and the server will not detach from the console.
Prefix: httpd

Instruction: stop
Effect: Stops the Apache httpd daemon.
Context: apachectl
Chapter: https://httpd.apache.org/docs/2.4/en/programs/apachectl.html

Instruction: restart
Effect: Restarts the Apache httpd daemon. If the daemon is not running, it is started. This command automatically checks the configuration files as in configtest before initiating the restart to make sure the daemon doesn't die.
Context: apachectl
Chapter: https://httpd.apache.org/docs/2.4/en/programs/apachectl.html

Instruction: fullstatus
Effect: Displays a full status report from mod_status. For this to work, you need to have mod_status enabled on your server and a text-based browser such as lynx available on your system. The URL used to access the status report can be set by editing the STATUSURL variable in the script.
Context: apachectl
Chapter: https://httpd.apache.org/docs/2.4/en/programs/apachectl.html

Instruction: graceful-stop
Effect: Gracefully stops the Apache httpd daemon. This differs from a normal stop in that currently open connections are not aborted. A side effect is that old log files will not be closed immediately.
Context: apachectl
Chapter: https://httpd.apache.org/docs/2.4/en/programs/apachectl.html

Instruction: configtest
Effect: Run a configuration file syntax test. It parses the configuration files and either reports Syntax Ok or detailed information about the particular syntax error.
Context: apachectl
Chapter: https://httpd.apache.org/docs/2.4/en/programs/apachectl.html

Question: What is done on restart with a faulty config file
Answer: restart is not started, and old configuration remains
Page: https://httpd.apache.org/docs/2.4/en/stopping.html
Section: Graceful restart
Variables: In httpd
Context: apache

Instruction: #
Page: https://httpd.apache.org/docs/2.4/en/configuring.html
Effect: stating that the text until the end of the line should be ignored
Context: htppd configuration file
Section: Syntax

Instruction: ${foo}
Page: https://httpd.apache.org/docs/2.4/en/configuring.html
Effect: Is replaced by the value of foo in a preceding definition, if it exists.
Otherwise is replaced by the value of foo in an environment variable if it exists.
Otherwise is logged as warning
Context: htppd configuration file
Section: Syntax
Assuming: foo does not contain a colon

Page: https://httpd.apache.org/docs/2.4/en/invoking.html
Effect: uses foo as configuration file
Context: httpd (or apachectl)
Section: How Apache start
Abbreviation: -f foo

Effect: Signals httpd to do action foo
Context: httpd
Chapter: https://httpd.apache.org/docs/2.4/en/programs/httpd.html
Variables: foo being start, restart, or stop.
Abbreviation: -k foo
Extra: See Stopping Apache httpd for more information.

Effect: Sets the LogLevel to level during server startup. This is useful for temporarily increasing the verbosity of the error messages to find problems during startup.
Context: httpd
Chapter: https://httpd.apache.org/docs/2.4/en/programs/httpd.html
Abbreviation: -e level

Fla: -l
Effect: Output a list of modules compiled into the server. This will not list dynamically loaded modules included using the LoadModule directive.
Prefix: httpd

Fla: -t
Effect: Run syntax tests for configuration files only. The program immediately exits after these syntax parsing tests.
If -D DUMP_VHOSTS is also set, details of the virtual host configuration will be printed. If -D DUMP_MODULES is set, all loaded modules will be printed.
Prefix: httpd
Print: 0 (Syntax OK) or not equal to 0 (Syntax Error).

Fla: -V
Effect: Print the version and build parameters of httpd, and then exit.
Prefix: httpd

Instruction: start
Effect: Start the Apache httpd daemon. Gives an error if it is already running.
Context: apachectl
Chapter: https://httpd.apache.org/docs/2.4/en/programs/apachectl.html

Instruction: status
Effect: Displays a brief status report. Similar to the fullstatus option, except that the list of requests currently being served is omitted
Context: apachectl
Chapter: https://httpd.apache.org/docs/2.4/en/programs/apachectl.html

Instruction: graceful
Effect: Gracefully restarts the Apache httpd daemon. If the daemon is not running, it is started. This differs from a normal restart in that currently open connections are not aborted. A side effect is that old log files will not be closed immediately. This means that if used in a log rotation script, a substantial delay may be necessary to ensure that the old log files are closed before processing them. This command automatically checks the configuration files as in configtest before initiating the restart to make sure Apache doesn't die.
Context: apachectl
Chapter: https://httpd.apache.org/docs/2.4/en/programs/apachectl.html

Instruction: startssl
Effect: To start httpd with SSL support, you should edit your configuration file to include the relevant directives and then use the normal apachectl start. It has been removed from apache
Context: apachectl
Chapter: https://httpd.apache.org/docs/2.4/en/programs/apachectl.html

Instruction: / as last character of the line
Page: https://httpd.apache.org/docs/2.4/en/configuring.html
Effect: stating that the following line is the remaining of the current directive
Context: htppd configuration file
Section: Syntax

Variable: .htaccess
Meaning: A list of directives for the directory of this file and its descendant. Read on each file access, hence applied immediatly
Page: https://httpd.apache.org/docs/2.4/en/configuring.html
Section: Syntax
Typ: File