Httpd is an Apache HTTP server program. Directly execute a program to start the server service.
Syntax
Httpd [-hlLStvVX] [-c
[-D <set file parameters>] [-f <set File>]
Parameter description:
- -C
- -C
- -D <server Root Directory> specifies the root directory of the server.
- -D <set file parameters> specifies the parameters for passing in the configuration file.
- -F <Configuration File> specifies the configuration file.
- -H: displays help.
- -L display the modules contained in the server compilation.
- -L displays the description of the httpd command.
- -S displays the settings in the configuration file.
- -T test whether the syntax of the configuration file is correct.
- -V displays the version information.
- -V: displays the version information and environment.
- -X starts the server as a single program.
Instance
Check configuration file syntax error
# Httpd-t
Httpd: cocould not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
Syntax OK
Start httpd
Httpd
Httpd: cocould not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
Show compilation module
# Httpd-l
Compiled in modules:
Core. c
Prefork. c
Http_core.c
Mod_so.c
Display configuration files
# Httpd-L> 1. log | tail-n 20 1.log
Maximum number of children alive at the same time
Allowed in *. conf only outside, or
ServerLimit (prefork. c)
Maximum value of MaxClients for this run of Apache
Allowed in *. conf only outside, or
KeepAliveTimeout (http_core.c)
Keep-Alive timeout duration (sec)
Allowed in *. conf only outside, or
MaxKeepAliveRequests (http_core.c)
Maximum number of Keep-Alive requests per connection, or 0 for infinite
Allowed in *. conf only outside, or
KeepAlive (http_core.c)
Whether persistent connections shoshould be On or Off
Allowed in *. conf only outside, or
LoadModule (mod_so.c)
A module name and the name of a shared object file to load it from
Allowed in *. conf only outside, or
LoadFile (mod_so.c)
Shared object file or library to load into the server at runtime
Allowed in *. conf only outside, or