List of commonly used Apache directives

table of contents
My name is Nakagawa and I work in the System Solutions Department.
currently studying for
the LPIC202 exam particularly enthusiastic about the basic Apache configuration included in "Topic 208: HTTP Services,"
as it's relevant for server construction and troubleshooting.
I've compiled a list of frequently encountered Apache configuration items (directives).
・Apache configuration file
The file name and installation location of the Apache configuration file vary depending on the OS
| CentOS, RHEL, Fedora | /etc/httpd/conf/ |
|---|---|
| SUSE, Debian, MacOS | /etc/apache2/ |
| sauce | /usr/local/apache2/conf/ |
Each directory introduced here is only likely to contain configuration files, so
if you can't find it, try searching using the find command or similar.
・Apache directives
Directives are used to give instructions and specifications to programs.
You can add or edit settings by writing special commands in a file.
The directives that you will need to modify when building a server are as follows:
| Directive Name | Setting details |
|---|---|
| Timeout | The number of seconds it takes for a request to be processed |
| KeepAlive | Enable/disable handling of multiple requests over one TCP connection |
| MaxKeepAliveRequests | Maximum number of requests per TCP connection when KeepAlive is enabled |
| KeepAliveTimeout | Maximum waiting time for one TCP connection when KeepAlive is enabled |
| Options | Configure available features for a directory |
The directives for Apache child processes (processes launched by other processes) are as follows:
| Directive Name | Setting details |
|---|---|
| StartServers | Number of child processes to create at startup |
| MinSpareServers | The minimum number of waiting child processes |
| MaxSpareServers | Maximum number of waiting child processes |
| MaxClients | Limit on spawned child processes |
| MaxRequestsPerChild | Number of requests a child process can handle |
The setting values for child processes (processes launched by other processes) can be checked when the server load is high, and
the load can be reduced by adjusting the values taking into account Apache's access status and the server's processing performance.
lastly
and while I can pinpoint the cause of
the alerts that occur daily on each web server , I often feel that I fall short when it comes to identifying the root cause or finding measures to prevent recurrence.
understanding the load, basic performance, and configuration status of each server and
taking fundamental measures.
This time we only picked up a limited number of Apache directives, but
next we will look into middleware other than Apache.
1