Apache httpd 2.4ã§ã®è¨å®ã®å°ãã¿
Apache httpd 2.4ã®è¨å®ãæ¯åã°ã°ã£ã¦ã¯å¿ããã®ã§ããã¤ã³ãã«ãªãã¨ãããã¾ã¨ãã¦ãã
æ°ãåãããæ¸ã足ããã
 ãã°ã¾ãã
ErrorLogãAccessLogã¯ä¸è¬çã«ã¯åºå®ãã¡ã¤ã«ã«æ¸ãã¦ããã¦logrotateã§é©å®rotateããã®ãä¸è¬çï¼ãããããªã
logrotateã®è¨å®ãªãã«æåããæ¥ä»ä»ãã®ãã¡ã¤ã«ã«æ¸ãåºããã¨ã§daily rotationããããå ´åã¯httpdä»å±ã®rotatelogsã³ãã³ãã使ãpipeã®è¨æ³ã§æ¸¡ã
CustomLog "| /usr/sbin/rotatelogs -l /var/log/httpd/access_log.%Y%m%d 86400" ltsv
Rewriteã§ã®Proxyã¾ãã
mod_rewriteã使ã£ã¦Proxyã«ã¼ã«ãç´°ããå¶å¾¡ãããã±ã¼ã¹
ProxyPassRevese, ProxyPreserveHost, ProxyTimeout, TimeOut ã¯ããããRewriteRule [P] ã«å¯¾ãã¦å¹ã(ProxyPassã§ãªãè¨è¿°ã§ãå¹ããã¨ã¯ProxyPassReverseã ãããã¥ã¡ã³ãã«æè¨ããã¦ããããä»ã®3ã¤ãå¹ã)
ãã¡ããProxyTimeoutã¯(è¨è¿°ããã°)TimeOutã«åªå ãã
AWS ELBããã®ãã«ã¹ãã§ãã¯
VirtualHostã§æ¯ãåããè¡ã£ã¦ããå ´åãAWS ELBããã®ãã«ã¹ãã§ãã¯ã¯Host headerãããªãã®ã§ããã®ã¾ã¾ã§ã¯ã¢ããªã±ã¼ã·ã§ã³å´ã§ç¨æãããã«ã¹ãã§ãã¯ã¸ã¢ã¯ã»ã¹ãæµããªãã
ãã®å ´åãdefault VirtualHostãã以ä¸ã®ããã«ãã¦ã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã¸æµã(Proxyã®å ´å)
RewriteEngine On RewriteCond %{HTTP_USER_AGENT} ELB-HealthChecker [NC] RewriteRule /(.*) http://<%= @application_server %>/$1 [P,env=LBHC:true] RequestHeader append Host <%= @server_name %> env=LBHC RequestHeader append X-Forwarded-Proto https env=LBHC
ALBã®ãã«ã¹ãã§ãã¯ã ã¨ELB-HealthChecker/2.0
ã®ãããªUser-Agentãé£ãã§ãã