List of frequently used apache directives
My name is Nakagawa from the System Solutions Department.
currently studying for
the LPIC202 exam In particular, I am enthusiastically working on the basic settings of Apache included in "Theme 208: HTTP Service",
as this is related to server construction and troubleshooting.
We have summarized the frequently touched apache configuration items (directives).
・apache configuration file
The apache configuration file name and installation location differ depending on the OS.
CentOS・RHEL・Fedora | /etc/httpd/conf/ |
---|---|
SUSE・Debian・MacOS | /etc/apache2/ |
sauce | /usr/local/apache2/conf/ |
The directories introduced here are just likely to contain configuration files, so
if you can't find them, try searching using the find command.
・Apache directives
Directives are used to give instructions or specifications to a program.
Settings can be added or edited by writing special instructions in the file.
The following directives need to be modified when building the server.
directive name | Setting details |
---|---|
Timeout | Number of seconds from receiving a request to completing processing |
Keep Alive | Enabling/disabling multiple request processing in one TCP connection |
MaxKeepAliveRequests | Maximum number of requests in one TCP connection when KeepAlive is enabled |
KeepAliveTimeout | Maximum waiting time for one TCP connection when KeepAlive is enabled |
Options | Set available features for directories |
The directives regarding apache child processes (processes started by other processes) are as follows.
directive name | Setting details |
---|---|
StartServers | Number of child processes created at startup |
MinSpareServers | Minimum number of child processes to wait |
MaxSpareServers | Maximum number of child processes to wait |
MaxClients | Upper limit for child processes spawned |
MaxRequestsPerChild | Number of requests that a child process can handle |
checking the settings for child processes (processes started by other processes) when the server load is high,
or by modifying the values in consideration of the apache access status and server processing performance. Masu.
lastly
This is my second year at the company, and when dealing with alerts that occur daily on each web server,
I can determine the cause based on my past experience, but I am
not very good at investigating the root cause. In terms of finding measures to prevent recurrence, there are many things that I feel are lacking.
you understand the load, basic performance, and configuration status of each server and
take fundamental measures.
This time we only picked up a limited number of apache directives, but
next time we will also look into middleware other than apache.