NGINX,NGINX Plusã使ã£ãæµéå¶å¾¡ (from Official Blog)
æ¬è¨äºã¯ãä¸è¨ããã°è¨äºã翻訳ãããã®ã§ãã
å®æ¡ä»¶ã§åæ§ã®æ©è½ãå®è£
ãã¦ããããã²ä¾¿å©ããåºãããã
å·çè
ã®æ¹ã«è¨±å¯ãã¨ã£ã¦ç¿»è¨³ããã¦ããã ãã¾ããã
ãã翻訳誤ããªã©ããã¾ããããä¸è¨ã¾ã§ãé£çµ¡ããã ããã°å¹¸ãã§ãã
Queueing with nodelay,White Listingã¯å¤§å¥½ããªä½¿ãæ¹ãªã®ã§ã
ãã²ã覧ããã ãããã¨æãã¾ãã
(nodelayã¯ã翻訳è½åã®åé¡ã§è¡¨ç¾ãããªããããã«ããã®ã§ãå¥è¨äºã§æ¸ããã¨æãã¾ãããã)
以ä¸æ¬æã§ãã
- How NGINX Rate Limiting Works
- Configuring Basic Rate Limiting
- Handling bursts
- Queueing with No Delay
- Advanced Configuration Examples
- Configuring Related Features
æã便å©ãªæ©è½ã®ä¸ã¤ã ãããã°ãã°åéãã»è¨å®èª¤ããããNGINXã®æ©è½ããRate Limitingã§ãã
Rate Limitingã«ãã£ã¦ãç¹å®ã®æéã«åãä»ããHTTPãªã¯ã¨ã¹ãã®éãå¶å¾¡ã§ãã¾ãã
対象ã®ã¡ã½ããã¯ãGETãªã¯ã¨ã¹ãã®ããã«ã·ã³ãã«ãªãã®ãã¾ãããã°ã¤ã³ãã©ã¼ã ãªã©ã«ä½¿ãããPOSTãªã¯ã¨ã¹ãã§ãã
Rate Limitingã¯ããã«ã¼ããã©ã¼ã¹ã¢ã¿ãã¯ã®ãªã¯ã¨ã¹ãéãå¶éãããªã©ãã»ãã¥ãªãã£å¯¾çãç®çã¨ãã¦å©ç¨ãããã±ã¼ã¹ãããã¾ãã
ä¸è¨ã®ãããªä¾ã«ã¯ã protect against DDoS attacksãåèã«ãªãã§ãããã
ã¾ããä¸è¬çã«ã¯ã大éã®ãªã¯ã¨ã¹ãããå¾æ®µã®ã¢ããªã±ã¼ã·ã§ã³ãµã¼ããå®ãç®çã«ãå©ç¨ããã¾ãã
æ¬è¨äºã§ã¯ãNGINXã使ã£ãRate Limitingã®åºæ¬ãããæ¡å¼µçãªè¨å®ã«ã¤ãã¦è§£èª¬ãã¾ãã
How NGINX Rate Limiting Works
Rate Limitingã¯ãé»è©±éä¿¡ããã±ãã交ææ¹å¼ã«ã¦å¸¯åãå¶éããããã«åºã使ããã¦ããLeaky Bucketã¢ã«ã´ãªãºã ãæ¡ç¨ãã¦ãã¾ãã
æ¬ã¢ã«ã´ãªãºã ã¯ããã±ãã«æ°´ãããããããã±ãã«ãããç©´ããæ°´ãæ¼ãã ããããªã¤ã¡ã¼ã¸ã§ããããã注ãããæ°´ã®éãæ¼ãåºãæ°´ã®éãè¶
éããã¨ããã±ãããæ°´ãããµããã§ãããã
ãªã¯ã¨ã¹ããå¦çããå ´åãæ³å®ãã¾ãããã
ãã±ãã«æ³¨ãããæ°´ã¯ã¦ã¼ã¶ããã®ãªã¯ã¨ã¹ãã§ããããã±ãã®ãµã¤ãºã¯ãã¦ã¼ã¶ãªã¯ã¨ã¹ããFIFOã¢ã«ã´ãªãºã ã§å¦çãããããã«ä½¿ããããã¥ã¼ã§ãã
ã¾ããæ¼ãåºãæ°´ã¯ãµã¼ãã«å¦çãããããã«ãããã¡ããåºããªã¯ã¨ã¹ãã§ãããããµããæ°´ã¯ãç ´æ£ããã»å¦çããããã¨ã®ãªããªã¯ã¨ã¹ãã§ãã
Configuring Basic Rate Limiting
Rate Limitingã¯2ã¤ã®ãã£ã¬ã¯ãã£ã(limit_req,limit_req_zone)ã«ããè¨å®ããã¾ãã
ä¸è¨ãè¨å®ä¾ã§ãã
limit_req_zone $binary_remote_addr zone=mylimit:10m rate=10r/s; server { location /login/ { limit_req zone=mylimit; proxy_pass http://my_upstream; } }
limit_req_zone ãã£ã¬ã¯ãã£ãã«ã¦æµéå¶å¾¡ã®ãã©ã¡ã¼ã¿ãè¨å®ããlimit_req ãã£ã¬ã¯ãã£ããå®ç¾©ãããç®æã«ã¦æµéå¶å¾¡ãæå¹åããã¾ãã
(ãµã³ãã«ã®å ´åã/login/ãã±ã¼ã·ã§ã³ã¸ã®ãã¹ã¦ã®ãªã¯ã¨ã¹ãã対象ã§ãã)
limit_req_zone ã¯ãè¤æ°ã®ç®æ(Location)ã§å©ç¨ã§ãããããhttpãããã¯ã«å®ç¾©ããããã¨ãä¸è¬çã§ãã
è¨å®ã«ã¯ãä¸è¨3ã¤ã®ãã©ã¡ã¼ã¿ãå¿ è¦ã§ãã
- Key - å¶å¾¡å¯¾è±¡ã®ãªã¯ã¨ã¹ãèå¥åãå®ç¾©ãã¾ããä¾ã¨ãã¦ãNGINXã®å¤æ°ã§ãã$binary_remote_addr(Clientã®IPã¢ãã¬ã¹ãbinaryåãããã¼ã¿ãæã¤)ã使ãã±ã¼ã¹ãæãããã¾ããããã¯ãããããã®ã¦ãã¼ã¯ãªIPã¢ãã¬ã¹ããã¼ã¨ãã¦ãRate ãã©ã¡ã¼ã¿ã®å¤ã§æµéå¶å¾¡ãããã¨ãæå³ãã¾ãã(æã ã¯ã¡ã¢ãªä½¿ç¨éãåæ¸ãããããã¯ã©ã¤ã¢ã³ãã®IPã¢ãã¬ã¹ã示ã$remote_addrã§ã¯ãªãã$binary_remote_addrã使ç¨ãã¦ãã¾ãã)
- Zone - ããããã®IPã¢ãã¬ã¹ãã©ã®ç¨åº¦ã®ééã§ãªã¯ã¨ã¹ããã¦ãããä¿åããããã®ãå ±æã¡ã¢ãªã®é åã¨ãµã¤ãºãå®ç¾©ãã¾ãããã®ã¡ã¢ãªé åã¯ãããããã®Workerããã»ã¹ã«ã¦å ±æããã¾ãããã®å®ç¾©ã¯ãå ±æã¡ã¢ãªã®ååãå®ç¾©ããzoneé¨ã¨ãã³ãã³(:)ã§åºåãããsizeé¨ã®2ãã¼ããæã¡ã¾ããããããã16,000åã®IPã¢ãã¬ã¹ãä¿æããããå ´åã1MBã®é åã使ç¨ãã¾ããã¤ã¾ããä¸è¨ã®è¨å®ã§ã¯160,000ã®IPã¢ãã¬ã¹ãä¿æã§ãã¾ãããã容éãæ¯æ¸ããå ´åã使ç¨é »åº¦ãæãä½ããã¼ãåé¤ããã¾ãã
- Rate - æ大ãªã¯ã¨ã¹ãéãå®ç¾©ãã¾ããä¾ã§ã¯ãæµéã¯10request/secãè¶ éãããã¨ãã§ãã¾ãããNGINXã¯ãªã¯ã¨ã¹ããmsecã®ç²åº¦ã§è¨é²ãã¦ããããã®ä¾ã®å ´åã100msecã«1度ã®ã¿ãªã¯ã¨ã¹ãããããããå¶å¾¡ãã¾ãããªããªããæã ã¯burstãªã¯ã¨ã¹ãã許容ãã¦ããªãããã§ãã(see the next section)ããåã®ãªã¯ã¨ã¹ããã100msec以å ã«å°çãããã®ã¯ãrejectããã¾ãã
limit_req_zone ãã£ã¬ã¯ãã£ãã¯æµéå¶å¾¡å¤ãããã³å
±æã¡ã¢ãªã®ãã©ã¡ã¼ã¿ãå®ç¾©ãã¾ãã
ããããå®éã«ãªã¯ã¨ã¹ããå¶å¾¡ãããã®ã§ã¯ããã¾ããã
å¶å¾¡ãæå¹åããããã«ã¯ãlimit_req ãã£ã¬ã¯ãã£ããå«ãã Location ããã㯠Server ãããã¯ãå®ç¾©ããå¿
è¦ãããã¾ãã
ä¾ã®å ´åã/login/ ã«å¯¾ãããªã¯ã¨ã¹ããæµéå¶å¾¡ãã¦ãã¾ãã
ä¸è¨ã«ãããããããã®ã¦ãã¼ã¯ãªIPã¢ãã¬ã¹ãã/login/ã¸ã®ãªã¯ã¨ã¹ãã10request per secã«å¶éãã¤ã¾ãåã®ãªã¯ã¨ã¹ããã100msec以å ã«åãªã¯ã¨ã¹ãã§ããªãããã«ãã¦ãã¾ãã
Handling bursts
100msec以å
ã«2ã¤ã®ãªã¯ã¨ã¹ããåãä»ããã¨ã©ããªãã§ãããï¼
2ã¤ç®ã®ãªã¯ã¨ã¹ãã«å¯¾ããNGINXã¯ãããã¾ã¯ã©ã¤ã¢ã³ãã¸ã¹ãã¼ã¿ã¹ã³ã¼ã503(Service Temporarily Unavailable)ãè¿å´ãã¾ãã
ããã¯ãããããæã
ãæãã å½¢ã§ã¯ããã¾ããã
ãªããªãã¢ããªã±ã¼ã·ã§ã³ã«ã¯ãã¼ã¹ãçãªå¾åãããããã§ãã
ã¤ã¾ãæã
ã¯ãè¨å®å¤ãè¶
éãããªã¯ã¨ã¹ãããããã¡ãªã³ã°ãã¦é©åãªã¿ã¤ãã³ã°ã«å¦çãããã¨èãã¦ãã¾ãã
ããã¯ãlimit_req ãã£ã¬ã¯ãã£ãã« burst ãã©ã¡ã¼ã¿ãå©ç¨ããä¾ã§ãã
location /login/ { limit_req zone=mylimit burst=20; proxy_pass http://my_upstream; }
ãã® burst ãã©ã¡ã¼ã¿ã¯ãã¯ã©ã¤ã¢ã³ãã zone ã«ã¦å®ç¾©ãããæµéãã©ã®ç¨åº¦è¶
éã§ããããå®ç¾©ãã¾ãã
ãªã¯ã¨ã¹ããåã®ãªã¯ã¨ã¹ããã100msec以å
ã«å°çããå ´åã«ãã¥ã¼ã«putããããã¥ã¼ã®ãµã¤ãºã«ã¯20ãè¨å®ãã¦ãã¾ãã
ãã1ã¤ã®IPã¢ãã¬ã¹ããåæã«21ã®ãªã¯ã¨ã¹ããå°çããå ´åãNGINXã¯æåã«å°çãããªã¯ã¨ã¹ããå¾æ®µã®ãµã¼ãã«å³åº§ã«è»¢éããæ®ãã®20ããã¥ã¼ã«putãã¾ãã
次ã«ããã¥ã¼ã«å
¥ãããããªã¯ã¨ã¹ãã100msecæ¯ã«è»¢éãããããã¥ã¼ã«å
¥ãããããªã¯ã¨ã¹ãã®æ°ã20ãè¶
ããå ´åã«ã®ã¿ãã¯ã©ã¤ã¢ã³ãã«503ãè¿å´ãã¾ãã
Queueing with No Delay
busrt è¨å®ã¯ãã©ãã£ãã¯ã®æµããé©æ£åãã¾ãããããªãã®ãµã¤ããé
ãè¦ããããããå®ç¨çã§ã¯ããã¾ããã
æã
ã®ä¾ã§ã¯ããã¥ã¼å
ã®20çªç®ã®ãªã¯ã¨ã¹ãã¯è»¢éãããã¾ã§ã«2ç§å¾
ãããã¦ããããã®æç¹ã§ãã¯ã©ã¤ã¢ã³ãã¸ã®å¿çã¯ãã¯ãå½¹ã«ç«ããªãããããã¾ããã
ãããã£ãç¶æ³ã«å¯¾å¿ãããããburst è¨å®ã« nodelay ãã©ã¡ã¼ã¿ãå ãã¾ãã
location /login/ { limit_req zone=mylimit burst=20 nodelay; proxy_pass http://my_upstream; }
nodelay ãã©ã¡ã¼ã¿ã使ã£ãå ´åãNGINX㯠burst ãã©ã¡ã¼ã¿ã«å¾ã£ã¦ã¹ãããããã¥ã¼ã«å²ãå½ã¦ãã¾ãè¨å®ãããæµéå¶å¾¡ã課ãã
ã¾ããªã¯ã¨ã¹ãã"ç´ æ©ã"å°çããå ´åãNGINXã¯ãã¥ã¼ã«è»¢éå¯è½ãªã¹ããããããéãããã ã¡ã«è»¢éãã¾ãã
ãã®ã¹ãããã¯ãå©ç¨ä¸ãã¨ãã¼ã¯ãããé©åãªæéãçµéããã¾ã§ï¼ãã®ä¾ã§ã¯ã100ããªç§å¾ï¼å¥ã®è¦æ±ã«ãã£ã¦ä½¿ç¨ãããããã«è§£æ¾ããã¾ããã
åè¿°ã®ããã«ã20ã¹ãããã®ãã¥ã¼ã空ã§ããã21ã®è¦æ±ãæå®ã®IPã¢ãã¬ã¹ããåæã«å°çããã¨ãã¾ãã
NGINXã¯21åã®è¦æ±ãã¹ã¦ãç´ã¡ã«è»¢éãããã¥ã¼å
ã®20åã®ã¹ãããã転éæ¸ã¿ã¨ãã¼ã¯ãã100ããªç§ãã¨ã«1åã®ã¹ãããã解æ¾ãã¾ãã
ï¼ä»£ããã«25åã®ãªã¯ã¨ã¹ãããã£ãå ´åãNGINXã¯ç´ã¡ã«21åã転éãã20åã®ã¹ãããã«ã¯ãã¼ã¯ãä»ãã4åã®ãªã¯ã¨ã¹ããã¹ãã¼ã¿ã¹503ã§æå¦ãã¾ãï¼
ããã§ãæåã®20ãªã¯ã¨ã¹ãã転éããã101msecå¾ã«ãç°ãªã20ã®ãªã¯ã¨ã¹ããåæã«å°çãããã¨ãæ³å®ãã¾ãã
ãã®å ´åã1ã¹ãããã®ã¿ã解æ¾ããã¦ããç¶æ
ãªã®ã§ãNGINXã¯1ãªã¯ã¨ã¹ãã転éããæ®ãã®19ãªã¯ã¨ã¹ãã«503ãè¿å´ãã¾ãã
ãããæåã®è»¢éãã501msecå¾ã«æ°ãã20ã®ãªã¯ã¨ã¹ããå°çããå ´åã5ã¹ãããã解æ¾ããã¦ãããããNGINXã¯ç´ã¡ã«5ãªã¯ã¨ã¹ãã転éãã15ãªã¯ã¨ã¹ããæå¦ãã¾ãã
ãã®å¹æã¯10request per secã§å¶å¾¡ãã¦ãããã¨ã¨åçã¨ããã¾ãã
nodelay ãªãã·ã§ã³ã¯ãªã¯ã¨ã¹ãéã®è»¢éééãå¶éããã«ãæµéå¶å¾¡ããå ´åã«ä¾¿å©ã§ãã
Note: å¤ãã®ãããã¤ã¡ã³ãã«ããã¦ãlimit_reqãã£ã¬ã¯ãã£ãã§ã¯burstã¨nodelayãã©ã¡ã¼ã¿ã®ä¸¡æ¹ãæå¹åãããã¨ãæ¨å¥¨ãã¦ãã¾ãã
Advanced Configuration Examples
NGINXã®ãã®ä»ã®æ©è½ã¨Rate Limitingãçµã¿åããããã¨ã§ãããè¤éãªæµéå¶å¾¡ãå®ç¾ãããã¨ãã§ãã¾ãã
WhileListing
ãã®ä¾ã§ã¯ãã©ã®ããã«ãã¦æµéå¶å¾¡ã¨"ãã¯ã¤ããªã¹ã“ãå®ç¾ãããã示ãã¾ãã
geo $limit { default 1; 10.0.0.0/8 0; 192.168.0.0/24 0; } map $limit $limit_key { 0 ""; 1 $binary_remote_addr; } limit_req_zone $limit_key zone=req_zone:10m rate=5r/s; server { location / { limit_req zone=req_zone burst=10 nodelay; # ... } }
ãã®ä¾ã§ã¯ã geo, map ãã£ã¬ã¯ãã£ãã®ä¸¡æ¹ã使ã£ã¦ãã¾ãã
geo ãããã¯ã§ã¯ããã¯ã¤ããªã¹ãã«å«ã¾ããIPã¢ãã¬ã¹ã®å ´åã$limitã«0ããããã§ãªãå ´åã«$limitã«1ãã»ãããã¦ãã¾ãã
ãã®å¾ãmap ãã£ã¬ã¯ãã£ãã使ã£ã¦å¶å¾¡ç¨ã®ãã¼ã«å¤ãè¨å®ãã¾ãã
- $limit ã0ã®å ´åã$limit_keyã«ç©ºæååãã»ãã
- $limit ã1ã®å ´åã$limit_keyã«ã¯ã©ã¤ã¢ã³ãã®IPã¢ãã¬ã¹(binary)ãã»ãã
ãã¯ã¤ããªã¹ãIPã¢ãã¬ã¹ã®ããã«$limit_keyã«ç©ºæååãã»ããããããã¯ã¯ã©ã¤ã¢ã³ãIPã¢ãã¬ã¹ãã»ãããã¦ãã¾ãã
$limit_keyã®å¤ã空æååã®å ´åãlimit_req_zone ãã£ã¬ã¯ãã£ãã«ããã¦å¶å¾¡ãæå¹åããããã¤ã¾ããã¯ã¤ããªã¹ãã«è¨è¼ãããIPã¢ãã¬ã¹(10.0.0.0/8 and 192.168.0.0/24 subnets)ã¯æµéå¶å¾¡ããã¾ããã
ã¾ãããã®ä»ã®ãã¹ã¦ã®IPã¢ãã¬ã¹ã¯5request per secã§æµéå¶å¾¡ããã¾ãã
ãªããlimit_req ãã£ã¬ã¯ãã£ãã¯ãã±ã¼ã·ã§ã³:/ã«å¯¾ãã¦ãæ大10ã®ãã¼ã¹ãå¤ãè¨å®ãããnodelayãªãã·ã§ã³ãæå¹åãã¦ãã¾ãã
Including Multiple limit_req Directives in a Location
è¤æ°ã® limit_req ãä¸ã¤ã®ãã±ã¼ã·ã§ã³ã«è¨å®ãããã¨ãå¯è½ã§ãã
ãªã¯ã¨ã¹ãããããããå
¨ã¦ã®å¶å¾¡ãé©ç¨ãããæãå¶éã®å³ããå¶å¾¡ã使ç¨ããã¾ãã
ä¾ãã°ãä¸ã¤ä»¥ä¸ã®ãã£ã¬ã¯ããªã«ãã£ã¦é
延ããããã¦ããå ´åãæãé·ãé
延ã使ç¨ããã¾ãã
ã¾ãåæ§ã«ããããã£ã¬ã¯ãã£ããæ絶ããæ¡ä»¶ã«ä¸è´ããå ´åãä»ã®ãã£ã¬ã¯ãã£ãã許容ãã¦ãã¦ãããªã¯ã¨ã¹ãã¯æ絶ããã¾ãã
åè¿°ã®ãã¯ã¤ããªã¹ãã®è¨å®ãæ¡å¼µããä¾ã以ä¸ã§ãã
http { # ... limit_req_zone $limit_key zone=req_zone:10m rate=5r/s; limit_req_zone $binary_remote_addr zone=req_zone_wl:10m rate=15r/s; server { # ... location / { limit_req zone=req_zone burst=10 nodelay; limit_req zone=req_zone_wl burst=20 nodelay; # ... } } }
ãã¯ã¤ããªã¹ãã«åæãããIPã¢ãã¬ã¹ã¯æåã®æµéå¶å¾¡(req_zone)ã«åè´ãã¾ãããã2ã¤ç®ã®æµéå¶å¾¡(req_zone_wl)ã«åè´ãã¾ãã
ããã«ããã15 requests per secã«å¶å¾¡ããã¾ãã
ã¾ãããã¯ã¤ããªã¹ãã«åæãããªãIPã¢ãã¬ã¹ã¯åæ¹ã®æµéå¶å¾¡ã«åè´ããããå³ããè¨å®ãé©ç¨ããã5 requests per secã«å¶å¾¡ããã¾ãã
Configuring Related Features
Logging
NGINXãã°ã¯ä¸è¨ã®ä¾ã®ããã«Rate Limitingã«ãã£ã¦é 延ã»æ絶ããããã°ãåºåãã¾ãã
2015/06/13 04:20:00 [error] 120315#0: *32086 limiting requests, excess: 1.000 by zone "mylimit", client: 192.168.1.2, server: nginx.com, request: "GET / HTTP/1.0", host: "nginx.com"
ãã°ã¨ã³ããªã¼ã«ã¯ä¸è¨ã®ãã£ã¼ã«ããå«ã¾ãã¾ãã
- limiting requests â å¶å¾¡å¯¾è±¡ãªã¯ã¨ã¹ãã®ãã°çªå·ã示ãã¾ãã
- excess â ãã®ãªã¯ã¨ã¹ãã表ãè¨å®ãããã¬ã¼ããè¶ ããããªç§ãããã®ãªã¯ã¨ã¹ãã®æ°
- zone â å¶å¾¡ãããã¬ã¼ãå¶éãå®ç¾©ããã¾ã¼ã³
- client â ãªã¯ã¨ã¹ããè¡ã£ãã¯ã©ã¤ã¢ã³ãã®IPã¢ãã¬ã¹
- server â ãµã¼ãã¼ã®IPã¢ãã¬ã¹ã¾ãã¯ãã¹ãå
- request â ã¯ã©ã¤ã¢ã³ãããã®å®éã®HTTPè¦æ±
- host â HTTPãªã¯ã¨ã¹ããããã¼(Host)ã®å¤
ããã©ã«ãã§ã¯ãä¸è¨ã®ä¾ã®[ã¨ã©ã¼]ã«ç¤ºãããã«ãNGINXã¯æ絶ããããªã¯ã¨ã¹ããã¨ã©ã¼ã¬ãã«ã§è¨é²ãã¾ãã
ï¼é
延è¦æ±ã¯1ã¤ä¸ã®ã¬ãã«ã§ãã°ã«è¨é²ããããããããã©ã«ãã§infoã§ãï¼ã
ãã°ã¬ãã«ãå¤æ´ããã«ã¯ãlimit_req_log_levelãã£ã¬ã¯ãã£ãã使ç¨ãã¾ãã
ããã§ã¯ãæå¦ãããè¦æ±ãè¦åã¬ãã«ã§è¨é²ããããã«è¨å®ãã¾ãã
location /login/ { limit_req zone=mylimit burst=20 nodelay; limit_req_log_level warn; proxy_pass http://my_upstream; }
Error Code Sent to Client
ããã©ã«ãã§ã¯ãã¯ã©ã¤ã¢ã³ããæµéå¶å¾¡å¤ãè¶
éããéãNGINXã¯ã¹ãã¼ã¿ã¹ã³ã¼ã503ãè¿å´ãã¾ãã
limit_req_status ãã£ã¬ã¯ãã£ãã使ç¨ãããã¨ã§ãç°ãªãã¹ãã¼ã¿ã¹ã³ã¼ããã»ãããããã¨ãå¯è½ã§ãã
(ä¸è¨ã®ä¾ã§ã¯444ã使ç¨)
location /login/ { limit_req zone=mylimit burst=20 nodelay; limit_req_status 444; }
Denying All Requests to a Specific Location
ããç¹å®ã®URLã¸ã®ãã¹ã¦ã®ã¢ã¯ã»ã¹ãæå¦ãããå ´åãlocation ãããã¯ã« deny all ãã£ã¬ã¯ãã£ãã使ç¨ãããã¨ã§å¶å¾¡ãããã¨ãå¯è½ã§ãã
location /foo.php { deny all; }
Conclusion
æã
ã¯æµéå¶å¾¡ã«é¢ããå¤ãã®æ©è½ãå®ç¾ãã¦ãã¾ãã
ä¾ãã°ãè¤æ°ã®ãã±ã¼ã·ã§ã³ã«ããã¦æµéå¶å¾¡ãå®ç¾ããæ©è½ããburst , nodelay ãã©ã¡ã¼ã¿ã¨ãã£ãæµéå¶å¾¡æ©è½ãæ¡å¼µããæ©è½ãªã©ã§ãã
ã¾ããåæ§ã«ãã¯ã¤ããªã¹ãããã©ãã¯ãªã¹ãã«å«ã¾ããIPã¢ãã¬ã¹ã«ç°ãªãæµéå¶å¾¡å¤ãä¸ããæ¡å¼µçãªæ©è½ããã©ã®ããã«ãã¦æ絶ã»é
延ãããããã°ã«è¨é²ããæ©è½ãæãã¦ãã¾ãã
ä»æ¥ããfree-30day trialãå§ããããæã ã«ãã¢ãä¾é ¼ãããã ããªã©ããã²ãNGINX Plusã®æµéå¶å¾¡ã試ãã¦ã¿ã¦ãã ããã