#1 understanding apache architecture
#1 apache mpm worker module
apache mpm event worker module :
apache mpm-prefork module
MaxRequestWorkers / MaxClients
maxrequestsperchild/maxconnectionsperchild
check mpm module apache2 using
Server version: Apache/2.4.29 (Ubuntu)
Server built: 2020-03-13T12:26:16
root@instance-1:/home/ubuntu/.ssh# apache2 -V [Fri Aug 07 10:55:45.384106 2020] [core:warn] [pid 9663] AH00111: Config variable ${APACHE_RUN_DIR} is not defined apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot Server version: Apache/2.4.29 (Ubuntu) Server built: 2020-03-13T12:26:16 Server's Module Magic Number: 20120211:68 Server loaded: APR 1.6.3, APR-UTIL 1.6.1 Compiled using: APR 1.6.3, APR-UTIL 1.6.1 Architecture: 64-bit Server MPM: Server compiled with.... -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D DYNAMIC_MODULE_LIMIT=256 -D HTTPD_ROOT="/etc/apache2" -D SUEXEC_BIN="/usr/lib/apache2/suexec" -D DEFAULT_PIDLOG="/var/run/apache2.pid" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="mime.types" -D SERVER_CONFIG_FILE="apache2.conf" root@instance-1:/home/ubuntu/.ssh#
/etc/apache2/mods-enabled
you can change in apache2.conf or enabling disabling module
mpm_prefork_module (shared)
nano /etc/apache2/apache2.conf
Disable unnecessary modules
root@instance-1:~# apache2ctl -M Loaded Modules: core_module (static) so_module (static) watchdog_module (static) http_module (static) log_config_module (static) logio_module (static) version_module (static) unixd_module (static) access_compat_module (shared) alias_module (shared) auth_basic_module (shared) authn_core_module (shared) authn_file_module (shared) authz_core_module (shared) authz_host_module (shared) authz_user_module (shared) autoindex_module (shared) deflate_module (shared) dir_module (shared) env_module (shared) filter_module (shared) mime_module (shared) mpm_prefork_module (shared) negotiation_module (shared) php7_module (shared) reqtimeout_module (shared) setenvif_module (shared) status_module (shared) root@instance-1:~#
Time-outs
keep alive
Increase Max Open Files
disable htaccess
AllowOverride should be directory specific.