nugawiki

./categories/os

Apache 2.4 보안·성능 설정

업데이트 2026-07-21 조회수

ServerTokens

httpd-default.conf

ServerTokens ProductOnly

메모리·캐시

httpd.conf

EnableMMAP off
EnableSendfile off

DocumentRoot <Directory>:

Header always set Pragma "no-cache"
Header always set Expires "Thu, 1 Jan 1970 00:00:00 GMT"
Header always set Cache-Control "max-age=0, no-store, no-cache, must-revalidate"
Header unset ETag
FileETag None

MPM EVENT — 동시접속 2048 / 4096

httpd-mpm.conf

<IfModule mpm_event_module>
    StartServers             32
    ServerLimit              32
    MinSpareThreads        512
    MaxSpareThreads        1024
    ThreadsPerChild          64
    MaxRequestWorkers      2048
    MaxConnectionsPerChild    0
    AsyncRequestWorkerFactor  1
</IfModule>
# 4096: StartServers/ServerLimit 64, MinSpare 1024, MaxSpare 3072, MaxRequestWorkers 4096

MPM WinNT — 2048

<IfModule mpm_winnt_module>
    ThreadsPerChild        2048
    ThreadLimit            2048
    MaxConnectionsPerChild    0
</IfModule>

보안 헤더

Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure;SameSite=None;
Header always set X-Content-Type-Options nosniff
Header always set X-XSS-Protection "1; mode=block"
Header always set Content-Security-Policy "default-src 'self' 'unsafe-inline' 'unsafe-eval'"
Header always set Content-Security-Policy-Report-Only "default-src 'self' 'unsafe-inline' 'unsafe-eval'"

SSL

SSLProtocol -all +TLSv1.2 +TLSv1.3
SSLProxyProtocol -all +TLSv1.2 +TLSv1.3

mod_jk

connection_pool_* = MPM ThreadsPerChild와 동일

worker.template.connection_pool_minsize=64
worker.template.connection_pool_size=64

./comments