Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
$ sudo vi nginx.conf $ sudo service nginx configtest nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful $ diff nginx.conf{,.`date +%Y%m%d`} 25,31c25 < keepalive_timeout 130; < send_timeout 130; < client_body_timeout 130; < client_header_timeout 130; < proxy_send_timeout 130; < proxy_read_timeout 130; < --- > keepalive
â [mruby][ruby] 30d.jp ã« ngx_mruby ãå°å ¥ãã話 (社å ã§å ±æããå 容ã®è»¢è¨ã§ã) 30d.jp ã« ngx_mruby ãå°å ¥ãã¦ã誰ãæåºããã§ããªãããã«ã¦ã§ã¢ã®ç½®ãæãã¨ããã©ã¼ãã³ã¹åä¸ãå®ç¾ãã¾ããã åæè¦ä»¶ 30d.jp ã«ä¿åãã¦ããç»åã¯ãµã¼ãã¹ã«ãã°ã¤ã³ãã¦ããæã®ã¿è¦ããããã«ããã ç»å㯠MogileFS ã«ä¿åãã¦ãããRails ãä»ããªãã§ã¬ã¹ãã³ã¹ãè¿ããã ngx_mruby å°å ¥åã®ã·ã¹ãã æ§æ ngx_mruby å°å ¥å¾ã®ã·ã¹ãã æ§æ å°å ¥å¾ã®å¹æ siege ãç¨ãããã³ããã¼ã¯(siege -b -c 8 -r 50)ã§ã¬ã¹ãã³ã¹ã¿ã¤ã 㧠1å²ã¡ãã£ã¨ã転éã¬ã¼ã㧠2å²ã¡ãã£ã¨ã®æ¹åã¨ãªãã¾ããã Elap Time, Resp Time, Trans Rate, Throughput, Concurrent
ä»åã¯ã.mdãã¡ã¤ã«ã«Markdownå½¢å¼ã§æç« ãæ¸ãã¦ããããããApache httpdãnginxã§ãã¹ããããã©ã¦ã¶ããã¢ã¯ã»ã¹ããã¨HTMLã«å¤æããã¦è¡¨ç¤ºãããMarkdownã³ã³ãã¼ã¿ã¢ã¸ã¥ã¼ã«ãmrubyã§æ¸ãæ¹æ³ãç´¹ä»ãããã¨æãã¾ãã Markdownã®ããã¹ãå½¢å¼ã§ä¿åãã¦ãããã¡ã¤ã«ãé©å½ã«Apacheä¸ã§é ä¿¡ããã°ããã©ã¦ã¶ä¸ã§HTMLã§ç¶ºéºã«é²è¦§ã§ããã¨ãã£ãããããã¢ã¬ãWebãµã¼ããæ¡å¼µãã¦å®è£ ãã¦ã¿ããã¨ãã話ã§ããèªåã®éçºç°å¢ããã¼ã«ã«ç°å¢ã®ã¡ã¢ç½®ãå ´ã«ãè¯ãããããã¾ããã Apacheã¢ã¸ã¥ã¼ã«ãnginxã¢ã¸ã¥ã¼ã«ã§å¹¾ã¤ããããã£ãæ©è½ãæä¾ããã¢ã¸ã¥ã¼ã«ã¯ããã¨æãã®ã§ãããããå°ãç¬èªã§æ¹è¯ãããã£ãããCè¨èªã§å®è£ ããã«ãã£ã¨ç°¡åã«èªåã§æ¸ãã¦ã¿ãããã¨ãã£ãè¦æ±ã«æ¬ã¨ã³ããªãèªãã¨çããããã¨æãã¾ãã ãã¡ãããããã®æ©è½ã®å®è£ ã¯ãå
Celebrating 20 years of nginx! Read about our journey and milestones in the latest blog. nginx first decides which server should process the request. Letâs start with a simple configuration where all three virtual servers listen on port *:80: server { listen 80; server_name example.org www.example.org; ... } server { listen 80; server_name example.net www.example.net; ... } server { listen 80; ser
nginxã§HTTPã¬ã¹ãã³ã¹ããããéããªãå°ãªãããè¨é²ã§ãã æ§æã¯rails+unicorn+nginx nginxã®ã¤ã³ã¹ãã¼ã« nginxã§HTTPããããåé¤ããæ©è½ãæå¹ã«ããã«ã¯ã½ã¼ã¹ããã¤ã³ã¹ãã¼ã«ãã¦ã¢ã¸ã¥ã¼ã«ã追å ããå¿ è¦ããããããã ã®ã§ãã½ã¼ã¹ããã¤ã³ã¹ãã¼ã«ãã¾ãã å ¬å¼ãã好ããªãã¼ã¸ã§ã³ãDL http://nginx.org/en/download.html ã¨ããããã¤ã³ã¹ãã¼ã« mkdir /usr/local/src cd /usr/local/src tar xzf nginx-xxx.tar.gz cd nginx-xxx ./configure make make install ã¢ã¸ã¥ã¼ã«ãåã£ã¦ãã cd /usr/local/src git clone https://github.com/agentzh/headers-more-n
ã¡ã¢ãnginxã®ãªãã¼ã¹ãããã·ã§ãã¡ã¤ã«ããã£ãã·ã¥ããæ¹æ³ã è¨å®ãããã¼ã¸ã¯ãããããã¯ã¨ã³ãã¯GoogleAppEngineã http://www.nullpobug.com/ 試ããnginxã®ãã¼ã¸ã§ã³ã¯0.7ãUbuntu10.04ã®ãªã®ã§å¤ãã nginxã®è¨å® nginx.confã®ä¸ã§conf.dãsites-enabledãincludeãããããã«ãªã£ã¦ããã¨ãåæã /etc/nginx/conf.d/proxy_cache.conf proxy_cache_path /var/cache/nginx/cache levels=1:2 keys_zone=my-key:16m max_size=100m inactive=120m; proxy_temp_path /var/cache/nginx/tmp;httpãã£ã¬ã¯ãã£ãã«proxy_cache_pat
Apacheã¢ã¸ã¥ã¼ã«ä½æã¯ä»¥åã®ã¨ã³ããªã®éãæ軽ã«åºæ¥ã¾ãã Apacheã¢ã¸ã¥ã¼ã«ã®ä½æã¨gdbã¨loggerã§ã®ãããã°æ¹æ³ - ããã®ã¯ã¦ãª ä»åã¯ãNginxã§ã¢ã¸ã¥ã¼ã«ä½æãã¦ã¿ããã¨ãã人åãã§ãã Nginxã«ãããå¦çã®æµãã¨æ¼ããã¦ããããæ§é ä½ãã¢ã¸ã¥ã¼ã«ä½ææ¹æ³ãã®ãã¦ããã¾ãã Nginx http://nginx.net/ ããããNginxã£ã¦ãªãã ï¼ã¨ãã人ã¯è»½éè¶ é«éãªHTTPãµã¼ãã¨ããç解ã§OKã§ãã å®éã«ã¯Reverse ProxyãMail Proxyã¨ãã¦ã使ç¨å¯è½ã§ãã©ã¤ã»ã³ã¹ã¯NSDç³»ã Nginxã«ã¤ãã¦ã¯ä»¥ä¸ãåç §ä¸ããã ããã©ã¼ãã³ã¹æ¯è¼ http://www.joeandmotorboat.com/2008/02/28/apache-vs-nginx-web-server-performance-deathmatch/ Ngin
Gyazoã便å©ã§ãããã大å¤ä¾¿å©ãªã®ã§ã社å ã§ãã©ã¤ãã¼ããªGyazoãµã¼ããç¨æãã¦ä½¿ã£ã¦ããä¼ç¤¾ãå¤ãã¨æãã¾ãã ãã¡ã§ããµã¼ãã®ããã©ã¼ãã³ã¹ã¯ç¹ã«å¿ è¦ãªãã®ã§ç¤¾å ã«é©å½ãªVMãç«ã¦ã¦éç¨ãã¦ããã®ã§ãããæ°å¹´åä½ã§éç¨ãã¦ããã¨ç»åãã¡ã¤ã«ãå¢ãã¦ããããdiskããªãã¨ãããå¿ è¦ã«è¿«ããã¾ããã ããã§ã©ãã©ãå¢ãããã¡ã¤ã«ã¯Amazon S3ã«éããããã¨ããèªç¶ãªçºæ³ã«è³ãããã§ãããGyazoãµã¼ãã¢ããªãæ稿ãåããã¨ãã«S3ã«ã¢ãããã¼ããããããªæ¹ä¿®ãããã®ã¯å¹´æ«ã®å¿ããææã«é¢åã楽ãããã ã¨ãããã¨ã§ S3 㨠nginx ãçµã¿åããã¦ãããããã«éç¨ã§ããããã«ãã¦ã¿ã¾ããã Gyazoã«éããã ãã¼ã«ã«ã«æ¸ãè¾¼ãã ãã¡ã¤ã«ãhttpã§é²è¦§ãã ä¸åº¦æ¸ãè¾¼ã¾ãããã¡ã¤ã«ã«ã¯å¤æ´ããªã ãã¡ã¤ã«ã¯æ¶ããªãã§ã©ãã©ãå¢ãã ãããªãã®ã«ã¯å¿ç¨ã§ããã¨æãã¾
Shin x blog Advent Calendar 2013 ã® 6 æ¥ç®ã§ãã ã¨ãããµã¤ãã«ãVarnish ããªãã¼ã¹ãããã·ã¨ãã¦å°å ¥ãã¦ãåå¹´ãçµéãã¾ããã å°å ¥ããçµç·¯ããã®å¹æãªã©æ¸ãã¦ã¿ããã¨æãã¾ãã Varnish ã¨ã¯ Varnish ã¯ãHTTP ã¢ã¯ã»ã©ã¬ã¼ã¿ã§ããWeb ãµã¼ãã®ãªãã¼ã¹ãããã·ã¨ãã¦åä½ãããã£ãã·ã¥ãçããã¦é«ãããã©ã¼ãã³ã¹ãçºæ®ããã®ãç¹å¾´ã§ããã¾ããVCL ã¨ããç¬èªã®è¨å®è¨èªãæã¡ãããã«ããç¶æ³ã«å¿ããè¨å®ãæè»ã«è¡ããã¨ãã§ãã¾ãã å°å ¥ã®çµç·¯ ãã®ãµã¤ãã§ã¯ LAMP æ§æã® CMS ãå©ç¨ãã¦ãããã¤ã³ãã©ã«ã¯ AWS ãå©ç¨ãã¦ãã¾ããåºæ¬ãé²è¦§ãä¸å¿ãªã®ã§ãããã¤ãã³ãæã«å¤æ°ã®ã¢ã¯ã»ã¹ãããã¾ããS3 ã CloudFront ãæ¤è¨ããã®ã§ãããã³ã³ãã³ããæ°åããã«æ´æ°ããå¿ è¦ãããã®ã§ä»åã¯æ¡ç¨ãã¾ããã§ãã
C10K対å¿Preforkåé«éPSGI/Plackãµã¼ãã® Monoceros ãHTTP/1.1ã«å¯¾å¿ããã¾ããã https://metacpan.org/release/Monoceros https://github.com/kazeburo/Monoceros Monocerosã§ã¯HTTPã®KeepAliveã«å¯¾å¿ãã¦ã大éã®æ¥ç¶ãæãäºãã§ãã¾ããããªãªã¼ã¹æç¹ã§ã¯HTTP/1.0 KeepAliveã«ãã対å¿ãã¦ãã¾ããã§ãããããããnginxã®upsream ãªã©ã§ã¯ãkeepaliveãæå¹ã«ãã¦HTTPã»ãã·ã§ã³ã使ãåãããå ´åã«HTTP/1.1ãæ±ãããã¾ãã 以åãã®ãããã®äºãããã¹ã¦blogæ¸ãã¦ãã¾ã nginx-1.1.x 㧠httpãªupstreamã«ãkeepaliveãã§ããããã«ãªã£ãã®ã§æ¤è¨¼ãã¦ã¿ã https://blog.nomads
2013/2/19ã«nginxãæ£å¼ã«WebSocketã«å¯¾å¿ããã¨ã¢ãã¦ã³ã¹ããã£ãã®ã§ã試ãã«ä½¿ã£ã¦ã¿ã¾ããã ãã¦ã³ãã¼ãã»ã¤ã³ã¹ãã¼ã« ããããnginx-1.3.13ããã¦ã³ãã¼ããã¦ãã¦ãã¤ã³ã¹ãã¼ã«ãã¾ãã ã¤ã³ã¹ãã¼ã«ãªãã·ã§ã³ã¯ããã¦ããã©ã«ã㧠$ wget http://nginx.org/download/nginx-1.3.13.tar.gz $ tar xvf nginx-1.3.13.tar.gz $ cd nginx-1.3.13 $ ./configure $ make $ sudo make install è¨å®ãã¡ã¤ã«ã®æ¸ãæã 次ã«nginx.confãæ¸ãæãã¾ããæ§æ㯠ãªãã¼ã¹ãããã·: 192.168.0.8:80 ããã¯ã¨ã³ããµã¼ã: 192.168.0.2:3000 3000ãã¼ãã®æ¹ã¯Node.jsã®ãµã¼ããåä½ããã¦ããã192.16
HeartRails Tech Blog ãã¼ãã¬ã¤ã«ãºã®ã¨ã³ã¸ãã¢ããã¶ã¤ãã¼ã«ããããã°ã§ãã ã¦ã§ããµã¼ãã¹ãã¹ããã¢ããªãIoT ããã¤ã¹ã®éçºã«é¢é£ããæè¡çãªæ å ±ãçºä¿¡ãã¦ããã¾ãã ã¿ãªãããã¯ããã¾ãã¦ãæ¨å¹´æ«ã«å ¥ç¤¾ãã¾ãã ãã¾ãã ã¨ããè ã§ãããã¾ããTwitter çã¯ãã£ã¦ããªããã¨ãããã¨ã«ãã¦ããã¦ãã ãããã¨ãããä½åãããããé¡ããããã¾ãã ãã¦ãåæ°å¹´ãã®é 1.1 ã®ã¾ã¾å¤ãããæãç¶ãã¦ãã HTTP ã®è¦æ ¼ã§ããããã®é ã¯æ°ããªé¢¨ãå¹ãã¦ãããHTTP/2.0 ã®åå¨ãè¦ãã¦ãã¾ãããã¾ã ã¯ã¼ãã³ã°ã°ã«ã¼ããçºè¶³ããã°ããã§ãããå ·ä½çã«å¤ããã®ã¯å½åå ã«ãªãã§ãããã¨ã¯æãã¾ãããç±³ Google 社ã®æå±ãã¦ãã SPDY ã HTTP/2.0 ã«åãå ¥ããããå½¢ãæ¿åã§ãããã¨è©±ããã¦ãã¾ãã SPDY ã¯å è¿°ããéãç±³ Google 社ã
ä»æ´ã ãã©ãnginxããªãããã«ä½¿ã£ã¦socket.ioãåããæ¹æ³ãè¦æ¸ã nginx_tcp_proxy_module If youâre using nginx, you wonât be able to proxy web socket connections using the standard nginx proxy_pass directives. Fortunately, Weibin Yao has developed a tcp proxy module for nginx that allows you to reverse proxy general tcp connections, especially well suited for websockets. http://www.letseehere.com/reverse-proxy-web-sockets
éç¨ç£è¦ã ã¨ã³ã¸ãã¢ãå¯¾å¿ ããã¾ã§ã®çµé¨ãå ã«ãã客æ§ã®æ¥åãå ¨é¢çã«ãµãã¼ããéç¨ç£è¦ãã¨ã³ã¸ãã¢ã«ãã24æéä½å¶ã§ç¶æ³å¤åã»é害çºçãæ©æã«æ¤ç¥ãã対å¿ãã¾ãã å¹ åºã対å¿å æè¡æ å½è ãä¸å¨ãã¾ãã¯å¥ã®æ¥åã«å°å¿µãããå ´åãããã¼ããã¼ãã®ã¨ã³ã¸ãã¢ãã¤ã³ãã©ç®¡çãã³ã³ãµã«ãã£ã³ã°ã¾ã§å¯¾å¿ããè¦æã«ãå¿ããã¾ãã
ç»åé ä¿¡ãªã©å¤§éã«ã¢ã¯ã»ã¹ãæãéã«ã¡ãã£ã¨æ°ã«ãªã£ã¦ããhttpãªupstreamã¨keepaliveã§ããªã件ããnginx-1.1ç³»ã§ã§ããããã«ãªã£ãã®ã§è©¦ãã¦ã¿ã ä»åkeepaliveã§ããããã«ãªã£ãã®ã¯âã®backendã¨éä¿¡ããã¨ããã æ¬å®¶ã®ããã¥ã¡ã³ãã¯ãã¡ã http://nginx.org/en/docs/http/ngxhttpupstream_module.html#keepalive keepaliveæ©è½ã使ãã«ã¯ã以ä¸ã®ããã«è¨å®ãã¾ã http { upstream backend { server 127.0.0.1:5000; keepalive 16; } server { listen 8080; server_name localhost; location / { proxy_http_version 1.1; proxy_set_head
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}