Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
NGINXããã¢ããªã±ã¼ã·ã§ã³ãµã¼ããNGINX Unitãããªã¼ãã³ã½ã¼ã¹ã§ç»å ´ãPHPãGoãPythonã«å¯¾å¿ãJavaãNode.jsã«ã対å¿äºå® NGINX Unitã¯Nginxã®éçºè ã§ããIgor Sysoevæ°ãè¨è¨ããNGNIXã®ã½ããã¦ã§ã¢éçºãã¼ã ãå®è£ ãããã®ã§ãå社ã¨ãã¦ã¯Nginxã¨åçã®éçºããã»ã¹ã¨å質ãå®ç¾ãã¦ããã¨ãã¦ãã¾ãã ç¾æç¹ã§PHPãGoãPythonã«å¯¾å¿ãJavaãRubyãNode.jsã«ã対å¿äºå®ã§ãã NGINX Unitã®æ大ã®ç¹å¾´ã¨ãã¦æãããã¦ããã®ã¯ãæåããåçå¶å¾¡ãå¯è½ãªããã«è¨è¨ããã¦ãããã¢ããªã±ã¼ã·ã§ã³ã®å ¥ãæ¿ãããã¼ã¸ã§ã³ã¢ãããªã©ãåèµ·åãããã¨ãªãã·ã¼ã ã¬ã¹ã«è¡ããã¨ããã§ãã RESTful APIãJSONã«ããã³ã³ãã£ã°ã¬ã¼ã·ã§ã³ã®å¤æ´ããªãã¼ãããªã¢ã«ã¿ã¤ã ãã¤åçã«åæ ãããã¨ã®ãã¨ã ã¾ããåä¸ãµã¼
æ¦è¦ Nginxã¨php-fpmã®è¨å®ã«ãããããã£ãã®ã§ãä»åã¯åå¿é²ã¨ãã¦ãNginxã»phpã®è¨å®ããphpinfo()ã表示ãããã¾ã§ã®æµããæ¸ãã¦ããã¾ãã 1.Nginxã®ææ°çãã¤ã³ã¹ãã¼ã« ã»PGPãã¼ã®è¿½å $curl http\://nginx.org/keys/nginx_signing.key | sudo apt-key add - ã»ãªãã¸ããªãä¸è¦§ã«è¿½å $sudo sh -c "echo 'deb http\://nginx.org/packages/ubuntu/ trusty nginx' >> /etc/apt/sources.list" $sudo sh -c "echo 'deb-src http\://nginx.org/packages/ubuntu/ trusty nginx' >> /etc/apt/sources.list" ã»ã¢ãããã¼
ã¿ã¤ãã«ãè¦ããåããããããã¾ããããç¾çªç ããããã®è¨äºã§ãã åç»é ä¿¡ç¨ã®ãµã¼ãã¼ãæ§ç¯ããæ¥åããã£ãã®ã§ãããApacheããnginxã®ã»ããæ§ç¯ããããæãããã£ãã®ã§ããã¼ã«ã«PCã«ä»®æ³ç°å¢ãæ§ç¯ãã¦ã¿ã¾ããã ä¸å¿ãç°¡åã«ææ°ç°å¢ãæ§ç¯ããã¨ãããã¨ã«ãã ãã£ã¦ãã¾ãã ä»®æ³Linuxç°å¢ã®æ§ç¯ ãã¼ã«ã«PCã«ä»®æ³Linuxç°å¢ãæ§ç¯ãã¾ãã VirtualBoxã®ã¤ã³ã¹ãã¼ã« https://www.virtualbox.org/wiki/Downloads ãã¡ãããä»®æ³åã½ããVirtualBoxããã¦ã³ãã¼ããã¦ã¤ã³ã¹ãã¼ã«ãã¾ãããªãã·ã§ã³ã¯ããã©ã«ãã®ã¾ã¾ã«ãã¾ããã Vagrantã®ã¤ã³ã¹ãã¼ã« VirtualBoxã ãã§ãä»®æ³ç°å¢ãæ§ç¯ãããã¨ã¯ã§ããã®ã§ãããã³ãã³ãã©ã¤ã³ããVirtualBoxãæä½ãããã¨ã®ã§ããVagrantãå°å ¥ããã¨ã¨ã¦ãå¹ç
ãChef + Vagrantã«ããPHP5.3 + MySQL + nginxã®éçºç°å¢ã http://www.engineyard.co.jp/blog/2013/chef-and-vagrant-gives-you-next-dev/ ãå ã«ãPHP5.4ç°å¢ã欲ããã£ãã®ã§Chefã®ã¬ã·ããã¡ããããã£ã¦ã¿ã¾ããã å ã® https://github.com/yandod/php5-nginx-vagrant-sample/blob/master/cookbooks/candycane_cookbook/recipes/default.rb ã®é ã«ä¸è¨ã追å execute "1st apt-get update" do command "apt-get update" end package "python-software-properties" do action [:in
Chartbeat measures and monetizes attention on the web. They were experiencing slow load times and TCP retransmissions due to default system settings. Tuning various TCP, NGINX and EC2 ELB settings like increasing buffers, disabling Nagle's algorithm, and enabling HTTP keep-alive resolved the issues and improved performance. These included tuning settings like net.ipv4.tcp_max_syn_backlog, net.core
nginxå®è·µå ¥é æè¡è©è«ç¤¾æ§ãããæµè´é ãã¾ãããèè ã®1人ã§ãã cubicdaiya ãããããããã ããã¨ããã話ãããã£ãæã¯é常ã«å æ ã§ããããããã¨ããããã¾ãã æã£ã¦ããã¨ããé常ã«è¯ãæ¬ã§ããããç¹ã«è¯ãã£ãç¹ã¨ãã¦ã¯ãç« ç«ã¦ãå«ããæ§æã®ç´ æ´ããããããã¦ã¾ãã«ãå®è·µããæèããã¤ã³ãã©ã¢ã¼ããã¯ãã£ã®æ¬ã«ãªã£ã¦ããç¹ã ã¨æãã Nginxã®ã¢ã¼ããã¯ã㣠éçãã¡ã¤ã«é ä¿¡ ãªãããæ§æ ã³ã³ãã³ãé ä¿¡ã·ã¹ãã ã¢ãã¿ãªã³ã° Luaã¨ãOpenRestyã¨ãã«ããæ¡å¼µ ã¨ããç« ç«ã¦ã«ãªã£ã¦ãã¦ãæµããé常ã«ãããããããNginxã軸ã«ãããæ§ã ãªã¤ã³ãã©ã®ãã¶ã¤ã³ãã¿ã¼ã³ã®èª¬æã«ãªã£ã¦ãããããã¯ç´ããã¨ãªããå®è·µãã®æ¬ã§ãããã¤ãããã®ã¤ã³ãã©ã¢ã¼ããã¯ãã£ã«ã¤ãã¦å¦ã¶ä¸ã§ãè¯æ¬ã§ããã éçãã¡ã¤ã«é ä¿¡ããªãããæ§æãã³ã³ãã³ãé ä¿¡ã·ã¹ãã ãããããã®æ§æã«ã
ãã®è¨äºã¯ã¯ã¦ãªãããããã¼ã¢ããã³ãã«ã¬ã³ãã¼ãå§ãã¾ã - Hatena Developer Blogã®17æ¥ç®ã®è¨äºã§ãï¼æ¨æ¥ã¯ id:yashigani_w ã® Promiseãå¦ã¶ããã«Swiftã§Promiseãå®è£ ãã¦ã¿ã話 - yashigani?.days ã§ããï¼ ããã«ã¡ã¯ãã¯ã¦ãªã® id:wtatsuru ã§ããã¯ã¦ãªã®ã¤ã³ãã©å ¨è¬ãã¿ã¦ãã¾ãã ã¯ã¦ãªã§ã¯ããã°ãã°æ°ãµã¼ãã¹ãæ§ç¯ããæ©ä¼ãããã¾ããæ£å¼ãµã¼ãã¹ãããã°ãã¯ã¦ã©ã ã®ãããªå®é¨çãµã¼ãã¹ãå é¨ã® Microserviceã®ä¸é¨ã«ãªã£ã¦ãããã®ãªã©å¤ç¨®å¤æ§ãªãã®ãããã¾ããæ°è¦ãµã¼ãã¹ã®ã¤ã³ãã©ãæ§ç¯ããéã¯ãæå°æ§æã§ããã¤ã¤å¾ã®ã¹ã±ã¼ã«ãã¡ã³ããã³ã¹ãèããä»çµã¿ãä½ã£ã¦ãããã¨ã«ãªãã¾ãããã®è¨äºã§ã¯ã2015å¹´12æç¾å¨ã®ã¯ã¦ãªã§ã®æ¨æºçãªæ§æãç´¹ä»ãã¦ããã¾ãã æ°ãµã¼ãã¹ã®æå°æ§æ ãã¡
ã¯ããã«ä¸è¨ã®è¨äºãã¿ããåãããããããããã¾ããããè±èªãªã®ã§ãå®éã«ãã£ãæ¹æ³ã交ãã¦ã¡ã¢ãã¦ãããã¨æãã¾ããï¼ä¼¼ã¦ãã¨ãããããã¾ããã翻訳ã§ã¯ããã¾ãããï¼ Writing a Go (âgolangâ) Web App with nginx, FastCGI, MySQL, JSON åæã¨ãã¦ãGoè¨èªã§Webãµã¼ãã¼ãã¤ãã£ã¦åããã¨è¨ãã¨ï¼ç¨®é¡ã®æ¹æ³ãããã¾ãã ï¼ã¤ã¯ãGoè¨èªã®ânet/httpâããã±ã¼ã¸ã¨ããã®ãããã¾ãã®ã§ãããã使ã£ã¦Goèªä½ã§Webãµã¼ãã¼ãä½ã£ã¦ãã¾ããã¨ãã§ãã¾ãã ãã1ã¤ã¯ãApacheãNginxãªã©ã®Webãµã¼ãã¼ä¸ã§ãCGI(æ£ç¢ºã«ã¯FastCGI)ã¨ãã¦Goè¨èªãåããæ¹æ³ã§ããããã¯Nginx+PHP-FPMã®ãããªãã«è¿ãã¤ã¡ã¼ã¸ã ã¨æãã¾ãã Nginxã使ãã使ããªããã¯ããã¡ãã®Stackoverflowãã¿ãã¨ã
ã¯ããã« åã¯ç²ç®çã«unicornãèµ·åããããã ãã«nginxã使ã£ã¦ãã¦ãè¨å®ãã¡ã¤ã«ã®å 容ã¨ããã»ã¨ãã©ç¥ããªãã ãªã®ã§ãããã«nginxã®è¨å®å 容ãã¾ã¨ããäºã§èªåèªèº«ãè¦ãããã¨æãã æ®æ®µä½¿ã大æµã®è¨å®ã¯è¨è¼ãã¦ããã¤ããã§ãã è¨è¼å 容ã¯å®éã«è©¦ãããã®ã¨è©¦ãã¦ãªããã®ãæ··å¨ãã¦ãã®ã§ã誤ã£ãè¨å®ãªã©ããããããããªãã®ã§ãã®è¾ºã¯ã³ã¡ã³ãã§ãææããã ããã¨å©ããã¾ãã ã¤ã³ã¹ãã¼ã« ã¤ã³ã¹ãã¼ã«ã«ã¤ãã¦ã¯åãæ¸ãããä»ã®äººã®è¨äºãè¦ãæ¹ãããã¨æãã centosã«å ¥ãããªã以ä¸ã®è¨äºãåèã«ãªãã CentOS6.xã«ã¦nginxã®ææ°çãã¤ã³ã¹ãã¼ã«ããæé CentOS 6.5ã§nginxãåããçºã®æä½éã®è¨å® ã¾ãchefã§ã¤ã³ã¹ãã¼ã«ããå ´åã¯ä»¥ä¸ã®è¨äºãå½¹ã«ãã¤ã Chefã§nginxãå°å ¥ãã¦ã¿ã Chefã§Nginxãã¤ã³ã¹ãã¼ã«ããã¨ãã«ããã£ã c
Go ã¯åä½ã§ã Web ãµã¼ããç«ã¦ããã¨ãå¯è½ã§ãããå ¬å¼ããã¥ã¡ã³ãã®ãµã³ãã«ãªã©ã§ãã ãããå èµã®ãã®ã使ã£ã¦ãã¾ãã package main import ( "fmt" "net/http" ) func handler(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "Hello World!") } func main() { http.HandleFunc("/", handler) http.ListenAndServe(":4000", nil) } ãã ãæè¿ã¯ Rails ã ã£ãã nginx + unicorn ã§ããã PHP ã nginx + php-fpm ã¨ãã£ãæ§æãã¢ãã³ãªæ°ããã¾ãã ãªã®ã§ããªãã¨ãªã Go ã§ã nginx ã®å¾ãã§ã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã«å°å¿µãããããªãã¨
Nginxã¨Golangã使ã£ã¦Webã¢ããªã±ã¼ã·ã§ã³ãä½æãã¦ã¿ããï¼ ã¨ããããªãã¨ãæãç«ã£ãã®ã§ãã£ã¬ã³ã¸ãã¦ã¿ã¾ããã å®è¡ç°å¢ OSã®ãã¼ã¸ã§ã³ã¯ä¸è¨ã®éãã§ãã ãµã¼ãã¯ãµã¯ã©VPSåãã¦ãã£ã¦ã¾ãã # cat /etc/system-release CentOS release 6.6 (Final)CentOS 6.6ã§ããã Nginxã®ã¤ã³ã¹ãã¼ã« yumã使ã£ã¦ã¤ã³ã¹ãã¼ã«ãã¾ãã # yum install nginxããã§è½ã¡ã¦ããã®ããã¼ã¸ã§ã³ãä½ããã®ã§ããã ã§ãã®ã§ã¢ãããã¼ããã¾ãã ã¾ãã¯nginxç¨ãªãã¸ããªãä½æãã¾ãã # vi /etc/yum.repo.d/nginx.repoå 容ã¯ä¸è¨ã®ããã«ãªãã¾ãã nginx.repo [nginx] name=nginx repo baseurl=http://nginx.org/package
nginx(èªã¿æ¹ã¯ "ã¨ã³ã¸ã³ã¨ãã¯ã¹" ããã) ããããããã®ã§è©¦ãã¦ã¿ãã nginxãHomebrewã§ã¤ã³ã¹ãã¼ã« $ brew install nginx ãã¹ãéã $ vim .zshrc export PATH=$PATH:/usr/local/sbin nginxãç«ã¡ä¸ãã $ nginx http://localhost:8080 ã«ã¢ã¯ã»ã¹ããã¨ããããªç»é¢ãåºãã ã¨ããããããã¾ã§ã§èµ·åãã¹ãã¯å®äºã ããã¡ããã£ã¨ããã£ã¦ã¿ãã ãµã¼ãã¼ãã¹ããã $ sudo nginx -s stop ãã¼ããå¤æ´ããã8080 -> 80ã¸ã nginxã®è¨å®ãã¡ã¤ã«ãç·¨éããã $ vim /usr/local/etc/nginx/nginx.conf server { listen 8080; server_name localhost; .... ã¨ãªã£ã¦ãã
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}