LinuxCommandLibrary

httpd

TLDR

Start Apache

$ sudo httpd
copy
Test configuration
$ httpd -t
copy
Start in foreground
$ httpd -X
copy
Show compiled modules
$ httpd -M
copy
Show version and build
$ httpd -V
copy
Use specific config
$ httpd -f [/path/to/httpd.conf]
copy
Graceful restart
$ httpd -k graceful
copy

SYNOPSIS

httpd [options]

DESCRIPTION

httpd is the Apache HTTP Server daemon. It serves web content using HTTP/HTTPS protocols, handling static files, CGI scripts, and reverse proxying.
Apache is highly configurable through modules and configuration directives, supporting virtual hosts, access control, and numerous authentication methods.

PARAMETERS

-t

Test configuration syntax.
-T
Start without document check.
-X
Run in single-process debug mode.
-f file
Specify configuration file.
-M
List loaded modules.
-V
Show version and build info.
-k signal
Signal (start, stop, restart, graceful).
-D param
Define runtime parameter.
-d dir
ServerRoot directory.
-e level
Log level.

CAVEATS

Configuration complex for beginners. Module compatibility varies. Performance tuning needed for high load. Security requires careful setup.

HISTORY

Apache HTTP Server was started in 1995 based on NCSA HTTPd, becoming the most popular web server for decades. The Apache Software Foundation grew around it. The name comes from "a patchy server" due to its patch-based origins.

SEE ALSO

nginx(1), apachectl(1), a2enmod(1), htpasswd(1)

Copied to clipboard