Õ¾³¤ÈçºÎ´¦Àí¼Æ»®ÖеÄÍøÕ¾¹Ø±Õʼþ
¡¡¡¡ÓÐÒ»¶Îʱ¼äÓû§¾³£ÎÊÎÒÃÇ£¬Èç¹ûij¸öÍøÕ¾Ôڹȸè»úÆ÷ÈËËÑË÷ʱ´¦ÓڹرÕ״̬£¬ÄÇô¸ÃÍøÕ¾ÔڹȸèËÑË÷½á¹ûÖеē¿É¼û¶È”ÊÇ·ñ»áÊܵ½¸ºÃæÓ°Ïì¡£ÓÐʱÍøÕ¾¹Ø±ÕÊÇÒ»ÖÖ²»¿É±ÜÃâµÄʼþ£ºÍøÕ¾Õ¾³¤¿ÉÄÜÒòÍøÕ¾³£¹æά»¤»ò³öÓÚ·¨ÂÉ»òÎÄ»¯·½ÃæµÄ¿¼ÂǶøÁÙʱ¹Ø±ÕÍøÕ¾¡£Èç¹ûûÓÐÏòÓû§Ã÷È·ÉùÃ÷³öÓÚÒÔÉÏÔÒò¶ø¹Ø±ÕÍøÕ¾£¬ÄÇôÍøÕ¾µÄÉùÓþÓпÉÄÜÊܵ½²»ÀûÓ°Ïì¡£ËäÈ»ÎÒÃÇÎÞ·¨±£Ö¤ÍøÕ¾µÄËÑË÷¡¢Ë÷Òý»òÅÅÃûÇé¿ö£¬µ«ÎÒÃÇÈÔ¿ÉÒÔijÖÖ·½Ê½´¦Àí¼Æ»®ÖеÄÍøÕ¾¹Ø±Õʼþ£¬ÒÔ±ÜÃâÍøÕ¾¹Ø±Õ¶ÔÍøÕ¾ÔÚËÑË÷½á¹ûÖеē¿É¼û¶È”²úÉú¸ºÃæÓ°Ïì¡£
¡¡¡¡ÀýÈ磬µ±ÍøÒ³±»ËÑË÷ʱ£¬ÍøÕ¾²»Ó¦·µ»ØHTTP½á¹û´úÂë404 (δ·¢ÏÖ) »òÏÔʾ´øÓÐ״̬´úÂë200(OK)µÄ´íÎóÒ³Ã棬¶øÓ¦·µ»Ø503 HTTP½á¹û´úÂë(·þÎñ²»¿ÉÓÃ)£¬ÏòËÑË÷ÒýÇæ±íÃ÷ÍøÕ¾Ö»ÊÇÁÙʱ¹Ø±Õ¡£´ËÍ⣬ÍøÕ¾Õ¾³¤»¹¿Éͨ¹ý·µ»ØÐÅÏ¢ÏòÓû§ºÍËÑË÷ÒýÇæÌṩÍøÕ¾Ôٴοª·ÅµÄ´óÖÂʱ¼ä±í¡£Èç¹ûÓµÓÐÏàÓ¦µÄÐÅÏ¢£¬ÍøÕ¾Õ¾³¤»¹¿ÉÀûÓÃRetry-After headerÑ¡ÏîÁгöÒÔÃë¼ÆËãµÄ¹Ø±Õʱ¼ä»ò¼Æ»®ÖеÄÖØпª·Åʱ¼ä£¬¹È¸è»úÆ÷ÈË¿ÉʹÓôËÐÅϢȷ¶¨ºÎʱÖØÐÂËÑË÷¸ÃÍøÕ¾¡£
¡¡¡¡·µ»Ø503 HTTP½á¹û´úÂ뻹ÓÐÖúÓÚ½â¾öÐí¶àÆäËûÇé¿öϵÄÎÊÌâ¡£ÓÐЩÍøÕ¾Òò·þÎñÆ÷´íÎó¡¢ÍøÕ¾¹Ø±Õ¡¢´ø¿íÓµ¼·ÁÙʱռλ·ûÒ³Ãæ(“ÕýÔÚ½¨ÉèÖД)¶ø·µ»Ø200(OK)½á¹û´úÂ룬ÕâЩÍøÕ¾ÔÚËÑË÷ÖÐͨ³£»áÓöµ½Ðí¶àÎÊÌâ¡£503 HTTP½á¹û´úÂëÊÇÍøÕ¾Õ¾³¤½â¾öÒÔÉÏÎÊÌâµÄÊ×Ñ¡·½°¸¡£Èç¹ûÒòÓ²¼þά»¤µÈÔÒò¶ø·¢Éú¼Æ»®ÄÚ·þÎñÆ÷Í£»úʼþ£¬¿ÉʹÓÃÁíÍâһ̨·þÎñÆ÷·µ»Ø503 HTTP½á¹û´úÂë¡£ÖµµÃ×¢ÒâµÄÊÇ£¬ÎÒÃDz»ÄÜ°Ñ·µ»Ø503¿´×÷Ò»ÀÍÓÀÒݵĽâ¾ö·½°¸¨D¨D³ÖÐø·µ»Ø503½«»áÔì³É“·þÎñÆ÷ÒÑÓÀ¾ÃÍ£»ú”µÄÓ¡Ï󣬴Ӷøµ¼ÖÂÎÒÃǽ«ÍøÕ¾URL´Ó¹È¸èË÷ÒýÖÐɾ³ý¡£
ÒÔÏÂΪÒýÓõÄÄÚÈÝ£º ¡¡¡¡header('HTTP/1.1 503 Service Temporarily Unavailable'); ¡¡¡¡header('Retry-After: Sat, 8 Oct 2011 18:27:00 GMT'); |
¡¡¡¡Èç¹ûÄãÉèÖÃÁË503(·þÎñ²»¿ÉÓÃ)µÄ·µ»ØÐÅÏ¢£¬Ê¹ÓÃPHPµÄheaderÐÅÏ¢½«ÓëÉÏÎÄÀàËÆ¡£
¡¡¡¡ÓëÈçºÎ³ä·ÖÀûÓÃ404Ò³ÃæÀàËÆ£¬ÎÒÃÇÒ²¿ÉÒÔÌṩ¶¨ÖÆ503ÐÅÏ¢£¬ÏòÓû§½âÊÍÏÖÔÚµÄÇé¿ö£¬°ïÖúËûÃÇÁ˽âÍøÕ¾½«ÓÚºÎʱÖØпª·Å¡£ÓйØHTTP½á¹û´úÂëµÄÏêϸÐÅÏ¢£¬Çë²Î¼ûRFC 2616¡£
¡¡¡¡·¢±íÕß: Tomer Honen,Kaspar Szymanski£¬¶¼°ØÁÖËÑË÷ÖÊÁ¿ÍŶÓ
¡¡¡¡ÔÎÄ: How to deal with planned site downtime
ÍƼöÐÅÏ¢
- ¹¹½¨¸ß¿ÉÓú͵¯ÐÔÉìËõµÄKV´æ´¢ÏµÍ³
- ̸̸ÍøÕ¾¾²Ì¬»¯£¨¶þ£©
- ̸̸ÍøÕ¾¾²Ì¬»¯£¨Ò»£©
- Ðì¹úÏ飺΢²©ÊÇ·ñ»á²ÎÓëÍøÕ¾ÅÅÃû
- ApacheÔÚ±¾µØ½¨Á¢·ºÓòÃûÐéÄâÖ÷»ú¼ò·¨
- ÈçºÎ½øÐÐÍøÕ¾Õï¶Ï ΪÍøÕ¾½øÐÐÆÀ·Ö
- Ò»¸ö³É¹¦µÄÕ¾³¤Ó¦¸Ã¾ß±¸µÄËØÖÊ
- Ò»Ìõ΢²©Òý·¢µÄ·ÖÎö£ºÈçºÎÈÃ΢²©µÃµ½¹ã·º´«²¥
- ÈçºÎÈÃÒ»¸öÍøÕ¾ÓÐÇ¿´óÉúÃüÁ¦
- פ×ãIDCÃż÷³Ö±Ò¹ÛÍû Õ¾³¤Ñ¡¹º¿Õ¼ä³É¡°¼èÄѵľö¶¨¡±£¿
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
ÆÀÂÛ