Apache HTTP Generator

Configure optimal MPM scaling, virtual hosts, proxy targets, and security headers. Uses exact memory mathematics to prevent OOM errors and generates fully decoupled OS deployment scripts.

Quick Presets
Routing
PHP & Proxy
75%RAM Peak
614Max Workers
2.5 MBThread Weight
15,350Est. RPS
NoneBottleneck
# ==============================================================================
# Apache Global Configuration
# ==============================================================================

ServerTokens Prod
ServerSignature Off
TraceEnable Off
FileETag None

Timeout 15
KeepAlive On
MaxKeepAliveRequests 1000
KeepAliveTimeout 3

# Request Limits
LimitRequestBody 10485760
LimitRequestFields 100
LimitRequestFieldSize 16380

<IfModule reqtimeout_module>
  RequestReadTimeout header=header=10-20,MinRate=500 body=body=20,MinRate=500
</IfModule>

# ------------------------------------------------------------------------------
# MPM Scaling Engine (EVENT)
# ------------------------------------------------------------------------------
<IfModule mpm_event_module>
  StartServers             6
  MinSpareThreads          25
  MaxSpareThreads          100
  ThreadsPerChild          25
  AsyncRequestWorkerFactor 2
  ServerLimit              27
  MaxRequestWorkers        614
  MaxConnectionsPerChild   10000
</IfModule>

# ------------------------------------------------------------------------------
# Security Headers
# ------------------------------------------------------------------------------
<IfModule headers_module>
  Header always set X-Content-Type-Options "nosniff"
  Header always set X-Frame-Options "DENY"
  Header always set X-XSS-Protection "1; mode=block"
  Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
  Header always set Referrer-Policy "strict-origin-when-cross-origin"
  Header always set Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline'"
</IfModule>

# ------------------------------------------------------------------------------
# Compression (mod_deflate)
# ------------------------------------------------------------------------------
<IfModule deflate_module>
  DeflateCompressionLevel 5
  DeflateBufferSize 8192
  DeflateWindowSize 15
  AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript application/json
</IfModule>

# ------------------------------------------------------------------------------
# Logging
# ------------------------------------------------------------------------------
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog ${APACHE_LOG_DIR}/access.log combined

# ------------------------------------------------------------------------------
# Global TLS Profile: MODERN
# ------------------------------------------------------------------------------
<IfModule ssl_module>
  SSLProtocol             all -SSLv3 -TLSv1 -TLSv1.1 -TLSv1.2
  SSLCipherSuite          ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
  SSLHonorCipherOrder     off
  SSLSessionTickets       off
</IfModule>