H2Oã§PHPï¼ãã¡ãã£ã¨ã ãåãã¾ã§ï¼
æ¨æ¥å¤ä¸ã«ãã¡ããã¡ãããã¾ãã¦ãã¡ã¢ã§ãããã¾ãã
github.com
æéhttpdã¨ãªãã§ãããH2Oã«ã¤ãã¦ãæè¿fastCGIãµãã¼ããè¼ã£ãï¼ã¾ã stableãªãªã¼ã¹ã§ã¯ãªããbetaããmasterãã©ã³ãï¼ã®ã§ãããã¾ã å
¬å¼ãµã¤ãã«è¨å®ãã®ã£ã¦ããªãã®ã§ãããããã¦ã¿ãã¡ã¢ã§ããã
追è¨ï¼ä»æããªãªã¼ã¹ããã¦ãããã§ãããã§ããï¼
è¨å®ãã¡ã¤ã«ã
ããããããã(æç²ãªã®ã§ããµã³ãã«ããå¿ è¦ãããªæã ãä¿®æ£ãã¦ãã ãã)
file.custom-handler: extension: .php fastcgi.connect: host: 127.0.0.1 port: 9000 type: tcp hosts: "127.0.0.1.xip.io:8080": paths: /: file.dir: /var/www/htdocs
ãã£ãã
H2Oã§PHP7ããããã¾ã¼ pic.twitter.com/fD5UI1cUjV
— uzulla (@uzulla) 2015å¹´6æ17æ¥
H2Oã¨PHP7ã¨ããããã¿ãã ãã§éããï¼ãã©ã»ãï¼
ãã â¦
http://hoge/index.php?q=1
ã¿ãããªã®ã¯ããã¨ãã¦ã
http://hoge/entry/1
ã¿ãããªã®ãphpã«ãããããæ¹æ³ã¯ã¾ã ããããã£ã¦ã¾ããããã®å
ããã¹ã¾ã
追è¨ï¼ã¢ã³ãµã¼ããã ãã¾ããï¼ãããã¨ããããã¾ã
Kazuho's Weblog: H2OとPHPを組み合わせるの、超簡単です(もしくはmod_rewriteが不要な理由)
fastCGIã®è¨å®ã«é¢ãã¦ãã©ãã§ããã¹ãã
ãã¹ãã³ã¼ãã«æ¸ãã¦ãã£ããã§ããããèªã¿ã¾ãããã
H2Oã®æ¹åæ§ã¯ï¼
ãèªãéã
FastCGI (or PHP) applications should be as easily configurable as it is for the Apache HTTP server
ã¨ãããã¨ã§ããã£ããï¼ã£ã¦ãªããã§ããã©ãnginxã¯ãã¨ãããApacheã«ããã¦ãç¾ç¶ã«ã¼ã¿ã¼ãã¤ãã£ã¦ãããããªã¢ããªã ã¨rewriteã«ã¼ã«ãhtaccessã¨ãã«ãã¡ãã¡ãããªãã¨ãããªãã®ã§ãApacheã¿ãããªã¹ã¿ã¤ã«ã楽ãªã®ãï¼ã¨ããã¨ã¡ãã£ã¨çåãããã¾ãã
ï¼ãã¨ãã°ä»¥ä¸ã¿ãããªã®ï¼
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [QSA,L]
ãããã¸ããã¹ãã£ã¨ãããªãã¨ãã¾ãApacheãnginxåæ§ã«H2Oã®è¨å®ã®ã¿ã¬ãå¿ è¦ã«ãªãããªããã¨ããæãã¯ããã¾ãã
nginxããããªãã§ãããURLãã¶ã£ããã£ã¦PATH_INFOã«ãããã¦â¦ã¿ãããªã®ãã©ããã風ã«ãã£ãã解決ã§ããããªããã¨ããæãã§ããã
PHPã¯ãã®ããããå²ã¨éã¨ããããèªç±å¥æ¾ã¨ãããããããããªããããï¼ã¨ããã®ããªãã®ã§ã大å¤ãªæã ã¨ã¯ãããã¾ããã
追è¨ï¼ãã¡ãåç
§ãã ãã
Kazuho's Weblog: H2OとPHPを組み合わせるの、超簡単です(もしくはmod_rewriteが不要な理由)
ï¼
ãã¨ãã°ãnginxã§ã¯å人çã«ã¯è²ã
試è¡é¯èª¤ãã¦ãããã¡ãã£ã¨åã®ã¢ã¤ãã£ã¢ã¨ãã¦ã¯ãããªã®ãããã¾ãããã¾ã¯ããã¡ãã£ã¨å¤ãã£ã¦ãã¦ãããã§ããâ¦ã
uzulla.hateblo.jp
ï¼
H2Oã«ã¯æå¾ ãã¦ãã¾ãï¼
å人çã«ã¯ã§ãããHTTP/2ã®å¿ è¦æ§ã¨ãã§ã¯ãªãããhttpdã¯ã§ããã ãæ©ãããããã§ãè¨å®ãã¡ã¤ã«ã«ç§ä¼ã®ã¿ã¬ããããã¨ããã®ããã£ã±ãããã©ãã®ã§ãããã©ã«ãã§ã¤ã±ã¦ãæãã«ãã¦ãããããã¨ãããã¨ãããH2Oã«ã¯ã¨ã¦ãæå¾ ãã¦ããã¾ãã
ä»å¾ãã¦ã©ãããã¦ããã¾ãã