apache:architecture
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
apache:architecture [2014/09/20 14:24] – [MPM Prefork Architecture] admin | apache:architecture [2022/10/29 16:15] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 3: | Line 3: | ||
MPM(Multi Processing Module) | MPM(Multi Processing Module) | ||
===== MPM Prefork Architecture ===== | ===== MPM Prefork Architecture ===== | ||
+ | Basic configuration: | ||
* StartServers: | * StartServers: | ||
* MinSpareServers: | * MinSpareServers: | ||
- | * MaxSpareServers: | + | * MaxSpareServers: |
+ | * MaxClients: | ||
{{: | {{: | ||
+ | Config example:< | ||
+ | < | ||
+ | StartServers | ||
+ | MinSpareServers | ||
+ | MaxSpareServers | ||
+ | MaxClients | ||
+ | MaxRequestsPerChild | ||
+ | </ | ||
+ | check config: | ||
+ | * check number of httpd process with none client request:< | ||
+ | ps -eaf | grep httpd | ||
+ | </ | ||
+ | root 1629 | ||
+ | apache | ||
+ | apache | ||
+ | apache | ||
+ | apache | ||
+ | apache | ||
+ | apache | ||
+ | </ | ||
+ | * run load test with 20 concurrecy requests to server:< | ||
+ | ab -n 200 -c 20 http:// | ||
+ | </ | ||
+ | ps -eaf | grep httpd | ||
+ | root 1013 | ||
+ | apache | ||
+ | apache | ||
+ | apache | ||
+ | apache | ||
+ | apache | ||
+ | apache | ||
+ | apache | ||
+ | apache | ||
+ | apache | ||
+ | apache | ||
+ | apache | ||
+ | apache | ||
+ | </ | ||
===== MPM worker Architecture ===== | ===== MPM worker Architecture ===== | ||
* StartServers: | * StartServers: | ||
Line 143: | Line 183: | ||
apache | apache | ||
</ | </ | ||
- | * pmap -x 6726 | sort -ak +2<code bash> | + | * pmap -x 6726 | sort -nk +2<code bash> |
pmap -x 6812 | sort -nk +2 | pmap -x 6812 | sort -nk +2 | ||
00007fcacac95000 | 00007fcacac95000 | ||
Line 158: | Line 198: | ||
===== Optimize apache and PHP config ===== | ===== Optimize apache and PHP config ===== | ||
==== optimize load module apache ==== | ==== optimize load module apache ==== | ||
- | Config load modules | + | Config |
- | <code bash> | + | |
- | LoadModule authz_host_module modules/ | + | |
- | LoadModule log_config_module modules/ | + | |
- | LoadModule expires_module modules/ | + | |
- | LoadModule deflate_module modules/ | + | |
- | LoadModule headers_module modules/ | + | |
- | LoadModule env_module modules/ | + | |
- | LoadModule setenvif_module modules/ | + | |
- | LoadModule mime_module modules/ | + | |
- | LoadModule autoindex_module modules/ | + | |
- | LoadModule negotiation_module modules/ | + | |
- | LoadModule dir_module modules/ | + | |
- | LoadModule alias_module modules/ | + | |
- | LoadModule rewrite_module modules/ | + | |
- | </ | + | |
- | Explain directives with these modules: | + | |
<code bash> | <code bash> | ||
LoadModule authz_host_module modules/ | LoadModule authz_host_module modules/ | ||
+ | LoadModule access_compat_module modules/ | ||
LoadModule log_config_module modules/ | LoadModule log_config_module modules/ | ||
LoadModule expires_module modules/ | LoadModule expires_module modules/ | ||
Line 192: | Line 216: | ||
</ | </ | ||
==== optimize load module php ==== | ==== optimize load module php ==== | ||
+ | ===== Custom Config for Apache ===== | ||
+ | ==== Config disable warning log from browser ==== | ||
+ | With this config, the log will display in PHP error log but they don't display in browser side\\\ | ||
+ | Update httpd.conf | ||
+ | <code php> | ||
+ | < | ||
+ | php_admin_flag display_errors off | ||
+ | </ | ||
+ | </ | ||
+ |
apache/architecture.1411223081.txt.gz · Last modified: 2022/10/29 16:15 (external edit)