How to use the Linux httpd command

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.