Apacheã¢ã¸ã¥ã¼ã«ã®mod-spdyãå ¥ãã¦ã¿ã¾ããã SPDYã¯ãHTTPãæ¡å¼µãã¦åä¸ã®ã»ãã·ã§ã³ã§è¤æ°ãªã¯ã¨ã¹ããéåä¿¡ãããã¨ãã§ãããããã³ã«ã§ãã å©ç¨ã«ã¯HTTPSéä¿¡å¯è½ãªç°å¢ãå¿ è¦ã§ãã ã¤ã³ã¹ãã¼ã«ã¯RPMãé å¸ããã¦ãããããããã使ãã¨æ¥½ã§ãã mod_spdy - Google Developers https://developers.google.com/speed/spdy/mod_spdy/ yum install at wget https://dl-ssl.google.com/dl/linux/direct/mod-spdy-beta_current_x86_64.rpm rpm -U mod-spdy-beta_current_x86_64.rpm ã¤ã³ã¹ãã¼ã«ããã¨ãApacheã®conf.dãã£ã¬ã¯ããªã«è¨å®ãã¡ã¤ã«ãã§ããã®ã§ã確èªããã¨
人éã¨ã¦ã§ãã®æªæ¥ï¼æ§ï¼ ãã¦ã§ãã®æ´å²ã¯äººé¡ã®æ´å²ã®ç¹°ãè¿ããã¨ãã観ç¹ããè²ã åå¼·ãã¦ãã¾ãã2014å¹´ã¾ã§ã®äººéã¨ã¦ã§ãã®æªæ¥ã®æ§ããã°ã§ãã mod_mrubyã«ã¯ãã²luajitçã«åã£ã¦ãè¨èªã®æ§è½ã®å·®ãã·ã¹ãã å ¨ä½ã®æ±ºå®çãªå·®ã§ãªããã¨ãæãã¦ãããã¨è¨ã£ã¦ã»ããããã£ããä»åæ¬é¡ã¢ã¼ã â Miura Hidekiãã (@miura1729) 1æ 23, 2013 ã¨ãããã¤ã¼ãã«è§¦çºããã¦ãmod_luaã®LuaJITçã®é度ãã©ã®ç¨åº¦æ©ããmod_mrubyã¨æ¯è¼ãã¦ã©ãã»ã©ã®æ§è½å·®ãããã®ãã試ãã¦ã¿ã¾ããã mod_luaã®LuaJITçã®è¨å® ãããçµæ§ã¯ã¾ã£ã¦ãã¾ã£ã¦ãææ°ã®Apache2.4.3ã½ã¼ã¹ã§âenable-luajitã¨ãã¦ããLuaJITçã§mod_luaãåä½ããããã«ã¯ãªã£ã¦ãã¾ããããã°ããªï¼ ã¨ããããã§ãApacheã®ã½ã¼ã¹ã追ã£ã¦
2012å¹´3æ15æ¥æ¨ææ¥ phpãé«éåãã60ã®æ¹æ³ 01. static ã«ã§ããã¡ã½ãã㯠static ã¨ãã¦å®£è¨ããããï¼4åéãï¼ 02. echo ã®æ¹ã print ããéãã 03. echo âæâ,'åâ; ï¼ã«ã³ãåºåãï¼ã®æ¹ããâæâ.'åâ ï¼ãããé£çµï¼ããéãã 04. ã«ã¼ãã®æ大å¤ã¯ãã«ã¼ããå ãã§ã¯ãªããåãã«ã»ãããã¦ãããã 05. 大ããé åã®ãããªå¤æ°ã¯ unset() ãã¦ã¡ã¢ãªã解æ¾ãããã 06. ãã¸ãã¯ã¡ã½ããï¼ä¾ï¼ __get, __set, __autoloadï¼ã¯ä½¿ç¨ãé¿ãããã 07. require_once ã¯ãã¤ã³ã¹ããªã®ã§ãã 08. include ã require ã§ãã¡ã¤ã«ã¯ãã«ãã¹ã§æå®ãããã 09. ã¹ã¯ãªããéå§æé㯠time() ã§ãªã $_SERVER['REQUEST_TIME
railsã§webã¢ããªãä½ãäºå®ãªã®ã§ãwebãµã¼ãã¼ã®ãã³ããã¨ã£ã¦è¦ã¾ããã ããã³ã大æè¿ã§ãï¼ï¼ï¼ **[çµæãããè¦ãã人ã¯ãã¡ã](#1)** ## ããããã®èª¬æ apacheã¨nginxã®èª¬æã¯çãã¾ãã passengerã¯rubyçmod_perlã§ãã * [Phusion Passenger](http://www.modrails.com/) unicornã¯ãRubyã®ããã®HTTPãµã¼ãã§ãã * [Unicorn: Rack HTTP server for fast clients and Unix](http://unicorn.bogomips.org/) perlã§ããStarmanã§ããã ## æ§æ ãã³ãåãããã®webã¢ããªãåããããã·ã³ã®ã¹ããã¯ã¯ä¸è¨ã®éãã§ãã rbenvã使ã£ã¦rubyã®1.9.3p125 使ãã¾ããã ### ãã·
KLab Advent Calendar 2011 ãDSAS for Social ãæ¯ããæè¡ãã®9æ¥ç®ã§ãã åå㯠php ãåããã¦ãã Apache ã®æåã«ãªãã¼ã¹ãããã·ã ç½®ãå¿ è¦æ§ã解説ãã¾ããã ä»æ¥ã¯ã ãã®åã® php ã®ããã»ã¹æ°ãçµãè¨å®ã¨åããã¦ãå®éã« Apache 㧠è¨å®ããæ¹æ³ãç´¹ä»ãã¾ãã 以éã php ãåããã¦ãã Apache ã®äºãã¢ããªãµã¼ãã¼ããªãã¼ã¹ãããã·ï¼ éçãã¡ã¤ã«é ä¿¡ãè¡ã£ã¦ãã Apache ã®äºããããã·ãµã¼ãã¼ã¨å¼ã³ã¾ãã åºæ¬è¨å® ã¾ãã¯åºæ¬çãªè¨å®ã®ããããã§ãã ã¢ããªãµã¼ã㼠並åæ°ãçµãã«ã¯ MaxClients ãè¨å®ãã¾ããã¢ããªãã©ããããã®æéã CPUã®å¦çã§ä½¿ã£ã¦ãã©ã®ãããã®æéãå¤é¨ãªã½ã¼ã¹å¾ ã¡ã«ä½¿ã£ã¦ãããã«ã ããã¾ãããã ãããCPUæ°ã®1.5åã2åããããé©å½ã ã¨æãã¾ãã Hyp
Apacheã®èå¼±æ§(CVE-2011-3192)ããããApache killerã話é¡ã«ãªã£ã¦ãã¾ããããã®è å¨ã«ã¤ãã¦ã¯ä¸é¨èª¤è§£ãããããã§ãã 以ä¸ã¯ãé常ã«è å¨ã¨ããå ±åã®ä¾ã§ãã ä¸æ¹ä»åã®ã¯ããã»ã¹ã®è¥å¤§åãä¼´ãã®ã§ãå®ã¡ã¢ãªæ¶è²»ãã¦æ´ã«ã¹ã¯ããã使ãå°½ããã¦OSæ¯æ¿éã«ãªã£ããããLinuxã¨ãã®å ´åã¯OOM Killerçºåã¨ãä»ã®ããã»ã¹ãå ´åã«ãã£ã¦ã¯OSãå·»ãè¾¼ãã§éã£ã¦ãã¾ãã¾ãã CVE-2011-3192 Range header DoS vulnerability Apache HTTPD 1.3/2.xããå¼ç¨ 以ä¸ã¯ãããã»ã©è å¨ã§ãªãã£ãã¨ããå ±åã®ä¾ã§ãã pooh.gr.jp ã¯çµæ§é ä¸ã ã£ãã®ã§ 60 並åã§ãã£ã¨ CPU idle 30% ã¾ã§æ¸ãããã Apache Killer (CVE-2011-3192) 対ç for CentOS 5
mod_rewriteã§ã®æå¾ã®ç ¦ - As a Futurist...ãã¿ã¦ãåãApacheã§URLã«%2Fãå«ããªã¯ã¨ã¹ãããªãã¼ã¹ãããã·ããã¨ãã«å°ã£ããã¨ããã£ããªã¼ã¨ããã®ãæãåºããã AllowEncodedSlashes On RewriteRule ^/(.*)$ http://backend/$1 [QSA,L,P]ã¿ãããªè¨å®ãæ¸ãã¦ãã¨ãã«frontendã« http://frontend/keyword/Fate%2Fstay+nightãªãªã¯ã¨ã¹ããæ¥ãã¨ããã®è¨å®ã ã¨backendã«ã¯ http://backend/keyword/Fate/stay+night%2Fããã³ã¼ããããURLã«ãããã·ãã¦ãã¾ãï¼ %2Fã®ã¾ã¾ãããã·ããã«ã¯ä»¥ä¸ã®ããã«è¨å®ãããã°ããã AllowEncodedSlashes On RewriteCond %{THE_RE
管çä¸ã®ãµã¼ãã§è¡ã£ã¦ããã»ãã¥ãªãã£è¨å®ãå ¬éãã¾ããæ¬å½ã¯ãããããã¨ãå ¬éããã®ã¯ãããããªãã®ã§ãããèå¼±ãµã¼ãã氾濫ãã¦ããç¾ç¶ãããè¸ã¿å°ã¨ãªã£ã¦sshã¢ã¿ãã¯ãããã®ãè¿·æ極ã¾ããªãã®ã§ãæä½éãã£ã¨ãã¨ããå 容ã§ã¾ã¨ãã¾ããã*1 èµ·åãµã¼ãã¹ã¨æ¦è¦ iptables/Firewallã®è¨å® iptablesã®ä¸èº« limit-burstã«ã¤ã㦠hashlimitã«ã¤ã㦠hosts.allow/hosts.deny(TCP Wrapper)ã®è¨å® sshdã®è¨å® ãã®ä»ã®è¨å® Apacheã®è¨å® Postfixã®è¨å® Dovecotã®è¨å® ã¾ã¨ã èµ·åãµã¼ãã¹ã¨æ¦è¦ Apache (www) sshd smtp/pop bind (DNS) ntpd ããã¤ãã®æ³¨æç¹ã sftpã§ååãªã®ã§ftpdã¯ä½¿ããªããWinSCPçã使ãã°ffftpã«ä¾åããå¿ è¦ã¯ãªãã*2
ApacheSSLã使ã£ã¦ãã¦ããã¹ãã¬ã¼ãºã®å ¥åãå¿ è¦ãªå ´åãèµ·åã§ããªããªã£ã¦ãã¾ã£ãããããã¨ããããå¼ãç¶ãããã¡ãã¨è¡ãããªããã¡ã¿ãããªä¼ç¤¾ã§ã¯ãæ å½è ãã³ãã³ãã¨å¤ãããã¨ãããããããªãµã¼ãã¼ã«åºãããå¯è½æ§ãé«ãããã¹ãã¬ã¼ãºã®å ¥åãå¿ è¦ãã©ãã確èªããæ¹æ³ã¨ãããã¨ã§ãã¯ããã¦åèµ·åãããµã¼ãã¼ã§ã¯ç¢ºå®ã«ç¢ºèªããå¿ è¦ãããã $ openssl rsa -in server.key â»server.keyã®å ´æ㯠ssl.conf ã® SSLCertificateKeyFile ã«æ¸ãã¦ããããããå®è¡ãã¦ããã¹ãã¬ã¼ãºãæ±ããããã«è¡¨ç¤ºãããã°ãæ®éã«èµ·åã§ãããããã¹ãã¬ã¼ãºãæ±ãããã¡ããã¨ãåã§çªç ´ãããããªããªãããã ããã¹ãã¬ã¼ãºãæ±ããããå ´åã§ãã以ä¸ã®è¨å®ãããã¦ããã°ããããã SSLPassPhraseDialog exec: ãã®æå®ãããã°ãæ®
è² è·è©¦é¨ãã¼ã« ã¤ã³ã¿ã¼ãããç ´å£ãå ¬éãã¾ããã ãã¡ãã¯ãã£ã¨ç¤¾å ã§è² è·è©¦é¨ã«ä½¿ç¨ãã¦ãããã¼ã«ã§ãã社å ã§ä½¿ç¨ãã¦ãããã®ãªã®ã§ãã½ã¼ã·ã£ã«ã¢ããªåãã®æ©è½ãªã©ãå¤å°è¿½å ããã¦ãã¾ããããã¡ããããã以å¤ã®Webã¢ããªã±ã¼ã·ã§ã³ã§ã使ç¨ã§ãã¾ãã åºæ¬çã«ã¯Apache JMeterã®ãããªWebã¢ããªã±ã¼ã·ã§ã³ããã®ã·ããªãªè² è·è©¦é¨ãã¼ã«ã§ããã³ãã³ãã©ã¤ã³ãªãã¬ã¼ã·ã§ã³ã ãã§å®è¡ã§ãããµã¼ãã¼ä¸ã§ç°¡åã«è² è·è©¦é¨ãå®æ½ã§ããã®ãç¹å¾´ã§ããPOSTãªã¯ã¨ã¹ããªã©ã¯ãã¡ãããã¬ã¹ãã³ã¹ã®ãã§ãã¯ãUserAgentã®å½è£ ãã©ã³ãã ãªå¤ããã©ã¡ã¼ã¿ã¼ã«ã»ããããæ©è½ãå®è£ ãã¦ãã¾ãã 注æ: å½ç¶ãªããèªåã®ç®¡çä¸ã«ãªããµã¤ãã«åãã¦è² è·è©¦é¨ãã¼ã«ãå®è¡ããã®ã¯çµ¶å¯¾ã«ããã¦ãã ãããé常ã«å±éºã§ãã ç©é¨ãªååãã¤ãã¦ãã¾ãããããã¯å®å ¨ã«ãããã®å°å çææ§ã®è¶£å³ã«ããã¨ããã§ããå°éã§
nginx+memcachedããã¡ãæ°ã«ãªã£ãã®ã§è©¦ãã¦ã¿ã¾ããã å ãã¿ã¯ä¸è¨ã§ãã A 53,900% speedup: Nginx, Drupal, and Memcache bring concurrency up and page load time way down | TechnoSophos nginxããªãã¼ã¹ãããã·ã«å©ç¨ããæ§æã§ãããã¯ã¨ã³ãã®åºåãmemcachedã«ãã£ãã·ã¥ãã¦ããã°ã次åãªã¯ã¨ã¹ãã§ã¯nginxããã®ãã£ãã·ã¥ãèªã¿åã£ã¦ãã®ã¾ã¾åºåãã¦ããã¾ãã ã¤ã¾ãããã¯ã¨ã³ãã«ãªã¯ã¨ã¹ããçµç±ãããã«nginxããå³åºåããã®ã§ããªãã®é«éåãè¦è¾¼ããã¨ããåªããã®ã§ãã ãªã³ã¯å ã§ã¯ããã¯ã¨ã³ãã«Drupalãå©ç¨ãã¦ããã®ã§ãããããã§ã¯CakePHPãå©ç¨ãã¦ã¿ã¾ãã 1. å ¨ä½æ§æ ãªãã¼ã¹ãããã·ã«nginx(Port: 80)ã使ããã
Google謹製Apacheã¢ã¸ã¥ã¼ã«ãmod_pagespeedã mod_pagespeedããã¹ããµã¼ãã«å°å ¥ãã¦ã©ããããã®ããã©ã¼ãã³ã¹ãåºããã®ãªã®ãæ¤è¨¼ãã¦ã¿ã¾ããã mod_pagespeedã®å¹æ mod_pagespeedã¯ããµã¼ããé«éåããã®ã§ã¯ãªããåºåããHTMLãé«éã«è¡¨ç¤ºã§ããããæ¸ãæããã¢ã¸ã¥ã¼ã«ãã¤ã¾ãããµã¼ããé å¼µã£ã¦ãã¦ã¼ã¶ã®ä½æé度ãåä¸ãããã å¤é¨CSSãã¡ã¤ã«ã®é£çµ å¤é¨JSãã¡ã¤ã«ã®é£çµ CSSã»JavaScriptã®minifyï¼æé©åï¼ CSSã»JavaScriptã®ä¸é¨HTMLã¤ã³ã©ã¤ã³å ãã®ä»ã®ç»åã¯Etag Cache-controlä»ãã®ç»åã«æ¸ãæãããã ãã¡ã¤ã«ãµã¤ãºã®å°ããç»å㯠data URI schemeï¼base64ï¼ ç»åã®å¹ ã»é«ãèªå調æ´ï¼ããã¯ã大ããç»åãç¡çããå°ãã表示ãã¦ããå ´åãªã©ï¼ï¼ ãã¯ã¤
Apacheã§X-Sendfileãå©ç¨ã§ããmod_xsendfileãPHPã¨é£æºãã¦ä½¿ã£ã¦ã¿ã¾ããã PHPã§èªè¨¼ãã¦ããã許å¯ããã¦ã¼ã¶ã®ã¿ã«ãã¡ã¤ã«ãåºåãããã¨ããå¦çãå®è£ ããå ´åããã¡ã¤ã«ã¯document_rootå¤ã«é ç½®ãã¦ããã¦ãreadfile()ãfpassthru()ã§ãã¡ã¤ã«ãåºåããã¨ããææ³ãè¯ã使ãã¾ãã ãã®æ¹æ³ã§ãåé¡ç¡ãå ´åãå¤ãã®ã§ããã容éã®å¤§ãããã¡ã¤ã«ãåºåããéã¯æã£ããããªã¹ãã¼ããåºãªãæãããã¾ãã ãã®ãããªæã¯mod_xsendfileã使ã£ã¦ããã¡ã¤ã«åºåã®é¨åãApacheã«ä»»ãã¦ãã¾ãæ¹æ³ãæå¹ã§ãã ããã§ã¯2010/11/12æç¹ã®ææ°çã§ããmod_xsendfile 0.12ã対象ã¨ãã¦ãã¾ããã¾ãã¤ã³ã¹ãã¼ã«ç°å¢ã¯RHELãCentOSãæ³å®ãã¦ãã¾ãã mod_xsendfileã®ã¤ã³ã¹ãã¼ã« mod_xsen
ã¦ã§ããµã¤ãã®ããã©ã¼ãã³ã¹ã®æ¹åãSEOãã»ãã¥ãªãã£ã«å½¹ç«ã¤.htaccessã®è¨å®ãç´¹ä»ãã¾ãã 17 Useful Htaccess Tricks and Tips åèï¼Apache ãã¥ã¼ããªã¢ã«: .htaccess ãã¡ã¤ã«ãApache ã³ã¢æ©è½ [ad#ad-2] .htaccessã®è¨å®ï¼ããã©ã¼ãã³ã¹ãSEOé¢é£ .htaccessã®è¨å®ï¼ã»ãã¥ãªãã£é¢é£ .htaccessã®è¨å®ï¼ããã©ã¼ãã³ã¹ãSEOé¢é£ .htaccessã§ã¿ã¤ã ã¾ã¼ã³ãè¨å® .htaccessã§ã¿ã¤ã ã¾ã¼ã³ãè¨å®ãã¾ãã ä¾ï¼æ±äº¬ SetEnv TZ JST-9 ãããã¯ã SetEnv TZ Asia/Tokyo .htaccessã§301ãªãã¤ã¬ã¯ããè¨å® .htaccessã§301ãªãã¤ã¬ã¯ãï¼æ°¸ç¶çãªãªãã¤ã¬ã¯ãï¼ãè¨å®ãã¾ãã ä¾ï¼æ§ãã¡ã¤ã«ï¼old.htmlï¼ãæ°ãã¡ã¤ã«ï¼new
# combinedã®LogFormatã«ã%{ADMIN_ID}e ã追å LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{ADMIN_ID}e\"" idcombined CustomLog "logs/access_log" idcombined ã¨ããã£ãããã ãã§ãaccess_logã«ä»»æã®å¤ã追å ãããã¨ãã§ãã¾ãã symfonyã§ã®ããã¸ã§ã¯ãã§ã¯ãå ±éã¢ã¯ã·ã§ã³ã®preExecuteå ã§apache_setenvãã¦ãããã ãã§ããã â Cookieã®å¤ããã°ã«åºå ã¡ãªã¿ã«ãããããapache_setenvããããªãã¨ããå ´åã«ã¯ãCookieã®å¤ããã°ãåºåãããã¨ãã§ãã¾ãã ãã¨ãã°ãcookieã«ADMIN_IDã¨ããå¤ãä»è¾¼ãã å ´åã¯ã 以ä¸ã®ãã©ã¼ãã
http://code.google.com/intl/ja/speed/page-speed/docs/filters.html Extend Cache ãã£ãã·ã¥ã¯å¹æçã ãã©ãæ´æ°æã«ãã©ã«ãå or ãã¡ã¤ã«åãå¤ããã®ãé¢åã»ã»ã»ã -> ãã£ãã·ã¥ãããã¼ã®èªåä»å ã«å ãã¦ããã¡ã¤ã«åãæ´æ°ãçºè¦ãã¦èªåã§å¤ãã¦ããããï¼ Outline CSS / Outline JavaScript CSS/JavaScriptããã£ãã·ã¥åã§ããããã«å¤é¨ãã¡ã¤ã«ã«ãããï¼ãã©ã¦ã¶ã«ãã£ã¦ã¯ä¸¦åã§ãã¦ã³ãã¼ãããããããï¼ãªã¯ã¨ã¹ããå¢ããããæ°ãã¤ãã¦ãï¼CSSã®åå¾å¾ã®htmlã®åã¬ã³ããªã³ã°ãæ°ã«ãªããï¼è¨æ¸¬ããªãã¨çµæ§å±éºãªæ°ããããï¼ Combine CSS CSSãã¾ã¨ãã¦ãªã¯ã¨ã¹ããæ¸ãããï¼ Inline CSS / Inline JavaScript ãªã¯ã¨ã¹ããªãã¦
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}