2010/12/10ã®åå¼·ä¼ã§çºè¡¨ã 主å¬è ãã¼ã¸â http://d.hatena.ne.jp/oranie/20101212Read less

2010/12/10ã®åå¼·ä¼ã§çºè¡¨ã 主å¬è ãã¼ã¸â http://d.hatena.ne.jp/oranie/20101212Read less
Apacheãã¤ã³ã¹ãã¼ã«ããæã«æ¨æºã§ã¤ãã¦ããã¢ã¸ã¥ã¼ã«ã®ãã¡ããã使ãã¢ã¸ã¥ã¼ã«ã¨ä½¿ããªãã¢ã¸ã¥ã¼ã«ãåé¡ãã¾ããã èªåã¯ã¡ã³ããã³ã¹ãããã©ãããã®ã§Apacheã¯ã¬ãã¸ããªã®æ¨æºã®ãã®ãå©ç¨ãã¦ãã¾ãããã¼ã¸ã§ã³ã¯2.2ã§ãã ãã¼ã¸ã§ã³ã®èª¿ã¹æ¹ ãã¼ã¸ã§ã³æ å ±ã¯apachectlã§è¡¨ç¤ºã§ãã¾ãã # apachectl -V ã¢ã¸ã¥ã¼ã«ã®æ©è½ã®èª¿ã¹æ¹ æ¨æºã§ã¤ãã¦ããã¢ã¸ã¥ã¼ã«ã¯å ¨ã¦å ¬å¼ãµã¤ãã®ããã¥ã¢ã«ã«æ©è½ã®æ¦è¦ã¨è¨å®æ¹æ³ã®è©³ç´°ãæ¸ãã¦ããã¾ãã ã¢ã¸ã¥ã¼ã«ä¸è¦§ â Apache HTTP ãµã¼ã çµæ§æ å ±éãããã®ã§ãå ¨é¨ç®ãéãã¨è¨ããã¨ã¯èããªãã¦è¯ãã¨æãã¾ããããèå³æ·±ãã¢ã¸ã¥ã¼ã«ããããããããªãã®ã§æµãèªã¿ãã¦ã¿ãã¨è¯ãããããã¾ããã å¿ è¦ãªã¢ã¸ã¥ã¼ã«ã¨å¿ è¦ã®ãªãã¢ã¸ã¥ã¼ã« å¿ è¦ã»éè¦ãªã¢ã¸ã¥ã¼ã« ããã¦èå¿ã®ã¢ã¸ã¥ã¼ã«ã®ä¸è¦§ãããã§ããæ¯è¼çå°ãªãã§ãã
kazuhoããããããã®ãµã¼ã管çè ã®éã§ã¯åå¨ä¾¡å¤ãçåè¦ããã¦ä¹ ãã (Min|Max)SpareServers ã ã¨æããã¨æ¸ããããhirose31ãããå»å¹´ã®YAPC::Asiaã§{Start,{Min,Max}Spare}Servers,MaxClientsã¯åãã«ãã¦ãããã¨çºè¡¨ããããå®éåè·ã®ãµã¼ãã¯ãã®ããã«è¨å®ããã¦ããã®ã§ãããèªåã§ãã¾ã説æãã§ãã¦ãªãã£ãã®ã§ã調ã¹ãªããæ¸ãã¦ã¿ãã æ¬å½ã¯ã¤ã³ãã©ããã°ç¨ã«æ¸ãã¦ãããã®ã§ãããããã°ã£ãã®ã§è»¢è¼ã åæã¨ãã¦ãCPUã®ä½¿ç¨çã«ãããsystemã¨fork Re: ã¯ã©ã¦ãããããã¯ã¼ã¯ã²ã¼ã éçºè ã«ããããã¦ããããã® - blog.nomadscafe.jpã§ãæ¸ãã¦ããéãforkã£ã¦ã®ã¯ãµã¼ãã«ã¨ã£ã¦éãé¨é¡ã®å¦çã«ãªãã¾ããã¤ã¾ãè² è·ã®é«ãã¨ãã«forkã大éã«è¡ãã®ã¯ãã¦ã¯ãªããªããã¨ã®ï¼ã¤ã§ãã
ããã«ã¡ã¯ nakamura ã§ããæè¿ãã«ã·ã¨ãããã¬ãåºããããããã¾ããï¼ã¦ã£ã¤ã¬ã¤ãã¦ã¨ããªããµã¤ããã¨ï¼ ãã¦ãã¦ä»åã¯æå¤ã¨ç¥ããã¦ãªããã©ããµã¤ããã¤ã³ã¿ã¼ãããã«å ¬éããéã«ã¯ç¥ã£ã¦ãããæ¹ãè¯ã Apache ã®è¨å®ãããã¤ããç´¹ä»ãã¾ãï¼ä¸é¨ PHP ã®è¨å®ãããã¾ããï¼ããã®è¨å®ããã¦ããªãããã¨ãã£ã¦å³å±éºã«ãããããã¨ãã訳ã§ãããã¾ãããããªã¹ã¯ã®è½ã¯æãã§ããã«è¶ããäºã¯ããã¾ããããã ç¡é§ãª HTTP ããããè¿ããªã ãã£ã¹ããªãã¥ã¼ã·ã§ã³ã«ããç°ãªãããããã¾ããããCentOS ããã©ã«ãã®è¨å®ã®å ´å Apache ãè¿ãã¦ãã HTTP ãããã¯ä»¥ä¸ã®ãããªãã®ã§ãã HTTP/1.1 200 OK Date: Mon, 05 Jul 2010 01:01:14 GMT Server: Apache/2.2.3 (CentOS) X-Powered
ãèªæ¸ææ³ãè«ççæèã¨ã¯ä½ã ââââ è«ççæèã¨ã¯ä½ã (岩波æ°æ¸ æ°èµ¤ç 2036)ä½è :渡é é å岩波æ¸åºAmazon Kindleçãããã¾ããè«ççæèã¨ã¯ä½ã (岩波æ°æ¸)ä½è :渡é é å岩波æ¸åºAmazon è«ççæèæ³ã¯ä¸çå ±éã§ã¯ãªããæèããç®çãã¾ãæ確ã«ãã¦ãã®ç®çã«åã£ãæèæ³ãé¸ã¶æè¡ãè¦ããâ¦
railsã®å®è¡ç°å¢ã¨ãã¦ãã®æ¥ããããã話é¡é¨ç¶ã®passengerã試ãã¦ã¿ãããã®ã¨ããæ®éã«ã¢ããªã±ã¼ã·ã§ã³ãç«ã¡ä¸ããã®ã¯ã¿ããªããã£ã¦ãããè¤æ°ã®ã¢ããªã±ã¼ã·ã§ã³ããã£ã¬ã¯ããªã§åãæ¿ããã¨ããã®ã¯ãã¾ãè¦ãªãã£ãã®ã§ç°¡åã«ã¾ã¨ãã¦ããã
ã±ã¼ã¿ã¤ã§ãmod_rewrite + ã»ãã·ã§ã³ãã使ãéã®æ³¨æç¹ Tweet 2008/6/6 éææ¥ matsui Posted in DoCoMo, ãµã¼ã | 4 Comments » ããæè¿ã¯å¤§ããªãã¥ã¼ã¹ãå¤ãããã¥ã¼ã¹è¨äºã®ç´¹ä»ã°ããã§ããã®ã§ãã²ããã¶ãã«æè¡ã¡ã¢çãªãã®ãæ¸ãããã¨æãã¾ãã å æ¥mod_rewriteã使ã£ã¦ãã¦ãã»ãã·ã§ã³çµ¡ã¿ã§å°ãã¤ã¾ã¥ãã件ããç´¹ä»ãã¾ãã å®ã¯PHPã§åãã¦ãããã¼ã¸ããã*.htmlãã¨ãã¦éçã³ã³ãã³ãã«è¦ãããã¨ãããã®ãä½ããã¨ãã¦ãã¾ããã .htaccessã®å 容ã¨ãã¦ã¯æ¬¡ã®éãã§ãã <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^([0-9A-Za-z~_\-\.]+)\.html$ /viewer.php?p=$1 [L] </IfModule>
å¾ ã¡ã«å¾ ã£ãã½ããã¦ã§ã¢ãã¤ãã«ç»å ´ãããRailsã¯çç£æ§ã®é«ãã«ã¤ãã¦ã¯å®è©ããããããã®è¨ç½®ãéç¨æ¹æ³ã«ã¤ãã¦ã¯Java並ã¿ã«æ·å± ãé«ãã£ããã¬ã³ã¿ã«ãµã¼ããªã©ã§ã¯å©ç¨ã«èããè¨ç½®ãé£ããã£ãã Passengerã®ããããã¼ã¸ ã ããããã§æ代ã¯å¤ãããããããªãããããªã½ããã¦ã§ã¢ãã¤ãã«ãªãªã¼ã¹ãããã ä»åç´¹ä»ãããªã¼ãã³ã½ã¼ã¹ã»ã½ããã¦ã§ã¢ã¯Passangerãmod_rails for Apacheã ã Passangerã¯gemããã¤ã³ã¹ãã¼ã«ããã½ããã¦ã§ã¢ã§ããããã¤ã³ã¹ãã¼ã«ããå¿ è¦ãªè«¸è¨å®ãè¡ã£ããå¾ã¯Mongrelã®ãããªã¢ããªã±ã¼ã·ã§ã³ãµã¼ããç«ã¡ä¸ãããã¨ããªãRailsãå©ç¨ã§ããããã«ãªãã ã¤ã³ã¹ãã¼ã«ä¸ Apache2.2ç³»ï¼æããâ¦ï¼ã§ã¯deny from allã®è¨å®ãæ¶ãå¿ è¦ãããããããããæ¶ãã°åé¡ãªãRailsãåä½ããããããã·ãä½ã
Apache/PHP/MySQL/SQLite/SQLiteManage/PhpMyAdmin/Zend OptimizerãWindowsã«ã¾ã¨ãã¦ãªã¼ã«ã¤ã³ã¯ã³ã§ã¤ã³ã¹ãã¼ã«ãããã¨ãã§ããããã«ãªã£ã¦ããã®ããªã¼ãã³ã½ã¼ã¹ã§éçºããã¦ãããã®ãVertrigoServãã ãããã®åã½ããã«ã¤ãã¦ç°¡åã«è¨å®ãå¤æ´ã§ããã³ã³ããã¼ã«ããã«ã£ã½ããã®ãã¿ã¹ã¯ãã¬ã¤ããä¸çºã§å¼ã³åºããããã«ãªã£ã¦ãããé常ã«è¨å®ãç°¡åã§ããã¾ããã¤ã³ã¹ãã¼ã©ã¯æ¥æ¬èªåããã¦ããã®ã§å®å¿ã§ãã å®éã®ã¤ã³ã¹ãã¼ã«æ¹æ³ãªã©ã¯ä»¥ä¸ããã VertrigoServ http://vertrigo.sourceforge.net/ ãã¦ã³ãã¼ããããå®è¡ãã¾ã ãOKããã¯ãªã㯠ã次ã¸ããã¯ãªã㯠ãåæããããã¯ãªã㯠ã次ã¸ããã¯ãªã㯠ããã«ã次ã¸ããã¯ãªã㯠ãã¤ã³ã¹ãã¼ã«ããã¯ãªã㯠ã¤ã³ã¹ãã¼ã«ä¸â¦â¦
mod_rewriteã使ãå ´åãURLã«ã%2Fããå«ã¾ããã¨Apacheã®è¨å®ã«ãã£ã¦ã¯æãéãã«åä½ããªãå¯è½æ§ãããã¾ãã mod_rewriteã«ã¤ãã¦ã¯ç¬¬15åã®ã¡ã¼ãªã³ã°ãªã¹ããåç §ãã¦ããã ãã¨ãã¦ãã¾ãã¯ä»¥ä¸ã®ãããªURLãèãã¦ã¿ã¾ãããã http://example.com/search/keyword%2Fkeyword ããã§ã¯ã以ä¸ã®ãããªã«ã¼ã«ã§å¤æãè¡ãã¨ãã¾ãã RewriteEngine On RewriteRule \/search\/(.+)$ /search.php?q=$1 [L] ã¾ããsearch.phpã¯mod_rewriteã®åä½ç¢ºèªç¨ã«ã以ä¸ã®ãããªç°¡åãªã³ã¼ãã使ç¨ããã¨ãã¾ãã <?php echo $_GET['q']; ?> å ã»ã©ã®URLã«ã¢ã¯ã»ã¹ããå ´åãsearch.phpãå¼ã³åºãã¦ãkeyword%2Fkeyword
Unix/Linuxç³»OSã®å ´åã§ãè² è·ç£è¦ã®ãã¼ã«ã¨ããã°topãæåã§ãããapacheã®è©³ç´°ã¾ã§ã¯ç£è¦ãããã¨ãã§ãã¾ããã ã¨ãã«ãããç¨åº¦ã®ã¢ã¯ã»ã¹æ°ã®ããWebãµã¤ããéç¨ãããã¨ã®ããæ¹ãªããããã¨æãã¾ãããæ»æã¨æããããããªè² è·ã«åºããããã¨ã¯ããã¨æãã¾ãã ãããªã¨ãã«ãç°¡åã«apacheã®ç¶æ³ã調ã¹ããã¨ãã§ããã®ãapachetopã§ãã ã©ããªã¨ãã«ä½¿ãï¼ apachetopã¨ãããã¨ã§ã使ç¨ããã®ã¯WebServerã§ããã¢ã¯ã»ã¹ãå¤ãã§ãµã¼ãã¼ãé«è² è·ã«ãªã£ã¦ãããªã¼ã¨ããç¨åº¦èªåãªãã«å¤æã§ããã¨ãã«ä½¿ãã¾ãã Debian/Ubuntuã§ããã°ã¤ã³ã¹ãã¼ã«ã¯ç°¡åã # sudo apt-get update # sudo apt-get install apachetop ç°¡åã«ä½¿ã£ã¦ã¿ãã 使ç¨æ¹æ³ãç°¡åã§ãã apachetopã¯apacheã®ã¢ã¯
æåã¯ãRootDirããã£ãããã®ã¾ã¾åãæ¿ããããã»ã»ã»ãªã㦠ã¡ãã£ã¨ããµããã¨ãèãã¦ãã¾ããï¼ç¬ï¼ ã¾ããã£ã¡ã®æ¹ãã·ã³ãã«ã§ããã©ãã ã§ãããªãã¨ãªãééã£ã¦ãã¡ã¤ã«ãªããªã£ã¦ãã¾ãã®ãå«ãªã®ã§ ãè¨å®ãã§ãªãã¨ããªããããªã¼ã¨æãã¾ããã IISã ã¨ã¡ãã£ã¨ããããªãã§ãããApacheã ã¨mod_rewriteã¨ãã ã¢ã¸ã¥ã¼ã«ãããã®ã¯ç¥ã£ã¦ããã®ã§ããã使ããã¨ã«ãã¾ããã ã¡ãªã¿ã«ãApacheã®ã³ã³ãã¤ã«æã«mod_rewriteã¢ã¸ã¥ã¼ã«ã å©ç¨ã§ããããã«ãã¦ãããªãã¨ãã®æ¹æ³ã¯ä½¿ãã¾ããã ã±ã£ã¨WindowsXPã«å ¥ãã¦ãApacheã§è©¦ãã¾ãããå©ç¨ã§ãã¾ããã§ããã ï¼Windowsã§ã¯ã使ããªãã¦ãå¥ã«åé¡ãªãã®ã§ãåå ã¯è¿½æ±ãã¦ã¾ããï¼ è¨å®èªä½ã¯ç°¡åã§ãhttpd.conf ã«RewriteEngine ã«ã¤ãã¦ã®è¨è¿°ã è¡ãã ãã§ãã ãããªæ
2007å¹´10æ05æ¥00:00 ã«ãã´ãªTipsLightweight Languages tips - Apacheã®Logãã©ã¼ãããã®æ¹ãå¤ãã¦é«éå ã¨ãããããé«è² è·ãµã¼ãã¼ã®å ´åãApacheã®Log Formatãå¤æ´ãã¡ãã£ãæ¹ãããã§ãããã ? ï¼é«éã«ï¼Apache ã® log ã解æããæ£è¦è¡¨ç¾ : a++ My RSS 管ç人ããã° ãããªã®åºãã¡ãããã ã¨æãã¤ãã¤ãã¨ã³ããªãå ·ä½çã«ã¯ã LogFormat "%h\t%l\t%u\t%t\t\"%r\"\t%>s\t%b\t\"%{Referer}i\"\t\"%{User-Agent}i\"" combined_tsv ãªãããããã« LogFormat "%h\t%l\t%u\t%t\t%r\t%>s\t%b\t%{Referer}i\t%{User-Agent}i" combined_tsv ã¨ãã¦
An attempt to create a default skeleton .htaccess file with the very best apache htaccess examples... Updated semi-frequently based on detailed info from the Apache htaccess tutorial. NOTE: Check out and use the Google 404 Error Page. Sample Htaccess File If you see any room for improvement, or if you can add something than go ahead and comment and I will definately give it a look for possible inc
AWSã¢ããã³ã¹ãã³ã³ãµã«ãã£ã³ã°ãã¼ããã¼ã®ä¸å¡ã¨ãã¦æ´»åããæ ªå¼ä¼ç¤¾ã¹ã¿ã¤ã«ãºããAWSå°å ¥ã移è¡ãéçºãã»ãã¥ãªãã£ãéç¨ä¿å®ãªã©ããã¹ã¦ã®ãç¸è«ã«ä¹ããã¦ããã ãã¾ãã AWSãå°å ¥ããããä½ããå§ããããããããããªã æ¢åã®ãã³ãã¼ãæ°æè¡ã«å¼±ããè¯ãææ¡ãããããªã ã¯ã©ã¦ãã®å°å ¥ã«ã»ãã¥ãªãã£ã®ä¸å®ããã AWSãã¨ããããå°å ¥ããããããã«æ´»ç¨ãã¦ãããã 社å ã«AWSã®ç¥è¦ãæã£ã¦ãã人ãããªã AWSãªãã§ã¯ã®ã·ã¹ãã éçºã詳ããç¥ããã
ããã«ã¡ã¯ satoã§ã Aapcheã§proxyãµã¼ããå©ç¨ãã¦ããå ´åãé »ç¹ã«ã¢ã¯ã»ã¹ããã¦ããªãã㤠æ´æ°ã®å°ãªããã¼ã¿ãï¼ãã©ãèµã mixiã§ãã ãã¤ãã¯ãã£ã¼ãªã©ï¼ 㯠proxyãµã¼ãã«ãã£ãã·ã¥ããã¨ã¬ã¹ãã³ã¹ãè¯ããªãã¾ãã mod_proxy_balancer㨠mod_disk_cache ãå©ç¨ãã¦ãproxyãµã¼ãã« ãã¼ã¿ããã£ãã·ã¥ããæé ãç´¹ä»ãã¾ã <VirtualHost * *:443> ServerName example.com ProxyPass /img ! # cssãã¤ã¡ã¼ã¸ãã¡ã¤ã«ã¯ proxyããªãã§ãã¼ã«ã«åç § ProxyPass /css ! <Proxy balancer://web> AddOutputFilterByType DEFLATE text/html text/css application/x-j
ãã¾ãç¥ããã¦ãã¾ãã(ã¨æããã)ãApache2(2.0.41以é)ã«ã¯ã¢ã¯ã»ã¹ãã°ã®æ¸ãåºããã¡ã¢ãªã«ãããã¡ãªã³ã°ãé«éåãããã¨ããæ©è½ãããã¾ãã ä»åã¯ãã®æ©è½ãæå¹ã«ããã¨ã©ããããéããªãã®ã調ã¹ã¦ã¿ã¾ããã è¨å®æ¹æ³ã¯httpd.confã« BufferedLogs On ã¨è¿½å ããã ãã§ãã°ã®ãããã¡ãªã³ã°ãæå¹ã«ãªãã¾ãã 以ä¸ãã³ããã¼ã¯ãåã£ãçµæã§ãã ãããã¡ãªã³ã°ç¡å¹984 Request/Sec ãããã¡ãªã³ã°æå¹1033 Request/Sec (åè)ãã®ã³ã°ç¡ã1055 Request/Sec â»å°ããªhtmlãã¡ã¤ã«ã«å¯¾ãã¦ab -c 100 -n 1000ãä½åº¦ãç¹°ãè¿ããçµæã®å¹³åã§ãã ä½æã§ã¯éããæããããªãã¨ã¯æãã¾ãããã³ããåãã¨ããã5%ç¨Request per secondã®å¤ãä¸ãã£ã¦ãã¾ããã éçãªãã¡ã¤ã«ã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}