JPA ã»ããã¼ã®æã« jshery æ°ãå§ãã¦ãã¾ããããè¿é Geek ã®è©±é¡ã§ç®ç«ã¤ããã«ãªã£ã¦ãããCatalyst ã mod_perl ã§ãªããå¤é¨ FCGI ã¨ãã¦èµ°ãããè¨å®æ¹æ³ãç´¹ä»ãã¾ãã Catalyst ããã»ã¹ã®èµ·å管ç㯠DJB æ°ã® daemontools ã«ãã管çããå§ãã§ããããã»ã¹ãæ»ãã§ãèªåçã«åèµ·åãã¦ããã¾ããæåã§ã®åèµ·åã楽ã§ããscreen ããã·ã§ã¼ãã«ãããã¼ç»é²ã㦠Catalyst ãåèµ·åããæ¹æ³ãå¾ã»ã©ç´¹ä»ãã¾ãã Catalyst ã® FastCGI èµ·åã®è¨å® ã¾ã㯠daemontools ã® run ã¹ã¯ãªããã§ãã run #!/bin/sh exec 2>&1 exec env - \ PATH='/bin:/usr/bin:/usr/local/bin:/var/www/www.example.com/scrip
ããã±ã¼ã¸ã¨ãã¦ã¤ã³ã¹ãã¼ã«ããå ´åãé常 /etc/lighttpd/lighttpd.conf ãè¨å®ãã¡ã¤ã«ã¨ãªãããã ããåãã«ã¤ã³ã¹ãã¼ã«ããããã®ã¯ãApacheã®ãã®ã¨æ¯ã¹ãã¨èª¬æããªãã®ã§ããµã³ãã«ã¨ãã¦ã¯ã¡ãã£ã¨åããã«ããã£ãã ãªããApache ã® .htaccess ã®æ§ãªããã¿ã¯ãªãã®ã§ããã£ã¬ã¯ããªæ¯ã®è¨å®ãå¿ è¦ãªãã°ãå ¨ã¦è¨å®ãã¡ã¤ã«ã¸æ¸ãè¾¼ãå¿ è¦ãããã
2022å¹´8æããã¼ã ãã¼ã¸ãå ¨é¢ãªãã¥ã¼ã¢ã«ãã¾ããï¼ æ å ±ãåããããããä¼ãã§ãããµã¤ãä½ããç®æãã¦ã¾ããã¾ãã Preface ï¼ LightTPDãï¼Light footprint + httpd = LightTPDï¼ãã¨ã¯ãã»ãã¥ãªãã£ãã¹ãã¼ããæä½æ§ãããã³æè»æ§ââããããã¹ã¦ã®äºæã«ããã¦ãã¦ã§ããµã¼ãã®å¹çãæé©åãã¾ãããã㪠LightTPD ã説æãã¾ããLightTPDã¯ãé«æ§è½ç°å¢ã®ããã«è¨è¨ãããæé©åããã¦ããã®ã§å°ãªãã¡ã¢ãªã«ãããããããªã³ããä»ã®ãµã¼ãã¨æ¯è¼ããã¨ãLightTPD ã¯cpuãã¼ãã¢ãã¬ã¼ã¸ã®å¹æçãªç®¡çãããã¦ãé«åº¦ãªæ©è½ã»ãã(FastCGIãCGIãAuthãåºåå§ç¸®ãURL-Rewritingãããã³ãã®ä»å¤ã)ãæã¤ãã¨ã§ç¾å¨è² è·åé¡ãæ±ãã¦ãããããããµã¼ãã®ããã®å®å ¨ãªè§£æ±ºçã«ãªããã¾ãã ããã¦ãããã¯æãããã
lighttpdã¯defaultã§ã¯å¤ããã¯æ¥ç¶ã§ããªãã®ã§è¨å®å¤æ´ãã# cd /etc/lighttpd # mkorg lighttpd.confãã®ä¸è¡ãã³ã¡ã³ãã¢ã¦ããã--- ./lighttpd.conf.org 2006-07-25 13:31:31.670000000 +0900 +++ ./lighttpd.conf 2006-07-25 13:31:35.040000000 +0900 @@ -62 +62 @@ -server.bind = "localhost" +#server.bind = "localhost" # /etc/init.d/lighttpd force-reloadhttp://co/ âã¡ããã¨è¡¨ç¤ºããã¾ããä¸èº«ã¯Apacheã®ã¨ãã®ã¾ã¾ã
ä½ãèããã« $HTTP["host"] == "backend.example.com" { proxy.server = ( "" => (("host" => "127.0.0.1", "port" => 3000))) } ãªã©ã¨ãã¦ãã¾ãã¨ã$c->uri_forã http://backend.example.com:3000/ ã«ãªã£ã¦ãã¾ã£ã¦é½åãæªããã大æµããã¯ã¨ã³ãã«ã¯ç´æ¥ãªã¯ã¨ã¹ãã¯éããªããããã ã§ããããªæã¯Catalystå´ã§using_frontend_proxy ã 1ï¼@see Catalyst::Engine::CGIï¼ã«ãã¦ãX-Forwarded-Hostãbackend.example.comã«ãªãããã«ããã°è¯ãã ApacheãZeusã®mod_proxyã¯èªåçã«X-Forwarded-Hostãä»ãã¦ããããã ãã©ãLighttpdï¼v
ããããªãã¨ããªãã¦ãããããçãªççãªåéãããã¦ãããã¿ã¾ããããã£ããæãã¦ãã ããã Apacheã® RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ http://127.0.0.1:3000/$1 [L,QSA]ã¿ãããªã¤ã¡ã¼ã¸ã§ã ãã¡ã¤ã«ãåå¨ããâãã®ãã¡ã¤ã«ãè¿ã ãã¡ã¤ã«ãåå¨ããªãâCatalystã¸é£ã°ã ã¨ããã®ããããã£ãã ç°å¢ã¯ Catalyst::Runtime-5.7012 Catalyst::Devel-1.03 lighttpd-1.4.18 http://unknownplace.org/slides/shibuyapm-7/start.html#slide30 ãåèã« setenv.add-environment = ("SCRIPT_NAME"
åæ¥ã«åã¶è©¦è¡é¯èª¤ã®çµæ ææ°ç lighttpdï¼1.4.15ï¼ ãã¼ãã£ã«ãã¹ããæå¹ fastcgi ãä½¿ç¨ è¤æ° Catalyst ã¢ããªã®å®è¡ ã«æåããã®ã§ããã®è¨å®ãã¡ã¢ãã¦ããã¾ãããéããªãã®ã§ãã¨ããããã²ã¨ã¤ã®ãµã¼ãã¼ã§ãµã¼ãã¹ãããããèµ·åããããã¨ããæã«ä½¿ããæ¹æ³ã§ãã pcre ã®ã¤ã³ã¹ãã¼ã« ãããã¤ã³ã¹ãã¼ã«ããã¦ããªãã¨ã¾ã¨ãã«åããªãã®ã§ãå ã«ã¤ã³ã¹ãã¼ã«ãã¾ãã $ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.1.tar.gz $ tar xvzf pcre-7.1.tar.gz $ cd pcre-7.1 $ ./configure $ make $ sudo make install ligttpd ã®ã¤ã³ã¹ãã¼ã« ããã»ã©ã¤ã³ã¹ãã¼ã«ãã pcre ãæå¹ã«
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}