nginxÅäÖÃexpiresºÍgzipѹËõ

ÅäÖÃexpires
expiresÆ𵽿ØÖÆÒ³Ã滺´æµÄ×÷Ó㬺ÏÀíµÄÅäÖÃexpires¿ÉÒÔ¼õÉٺܶà·þÎñÆ÷µÄÇëÇó
ÒªÅäÖÃexpires£¬¿ÉÒÔÔÚhttp¶ÎÖлòÕßserver¶ÎÖлòÕßlocation¶ÎÖмÓÈë

       location ~ .(gif|jpg|jpeg|png|bmp|ico)$ {
  ...

    SquidºÍApacheÖеÄmax-ageÓëExpiresµÄ·Ö±ð

Ö÷ÒªÖصãÔÚÓÚÎÒÃÇÒªÃ÷°×Ò»¸öÏà¶Ô(Expires)Ò»¸ö¾ø¶Ô(max-age).
·Ö±ð
max-age
max-ageÊÇHTTP/1.1ÖÐ,ËûÊÇÖ¸ÎÒÃǵÄwebÖеÄÎļþ±»Óû§·ÃÎÊ(ÇëÇó)ºóµÄ´æ»îʱ¼ä,ÊǸöÏà¶ÔµÄÖµ,Ïà¶ÔRequest_time(ÇëÇóʱ¼ä).
ÀýÈç:A.html  Óû§ÇëÇóʱ¼äÊÇ18:00,max-ageÉèÖõÄÊÇ600µÄ...

    ¸ºÔؾùºâ»·¾³ÖкÍÈçºÎÉèÖÃExpiresºÍEtag

ÔÚ¸ºÔؾùºâ»·¾³ÖУ¨LVS, LoadBalance£©ÎªÁ˼õÉÙä¯ÀÀÆ÷Êý¾ÝµÄÖظ´ÇëÇó²Ù×÷£¬Ò»°ãÐèÒªÉèÖà Http Header µÄ Etage ºÍ Expires ¸æËßä¯ÀÀÆ÷ÇëÇóÊý¾ÝÊÇ·ñÒѹýÆÚ¡£ÒÔÏÂÄÚÈÝÖ÷Òª¿¼ÂÇApache+squid »·¾³

ETag HeaderÊÇÎļþÐÞ¸Äʱ¼ä¡¢Îļþ´óСºÍinodeºÅÉú³ÉµÄУÑ飨checksum...

    LinuxϵÄMemcache°²×°¹ý³Ì

×î½üÔÚÑо¿ÔõôÈÃDiscuz!È¥Ó¦ÓÃMemcacheÈ¥×öһЩÊÂÇ飬¼Ç¼ÏÂMemcache°²×°µÄ¹ý³Ì¡£

LinuxÏÂMemcache·þÎñÆ÷¶ËµÄ°²×°
·þÎñÆ÷¶ËÖ÷ÒªÊÇ°²×°memcache·þÎñÆ÷¶Ë£¬Ä¿Ç°µÄ×îа汾ÊÇ memcached-1.3.0 ¡£
ÏÂÔØ£ºhttp://www.danga.com/memcached/dist/memcached-1.2.2.tar....

    lighttpdÐéÄâÖ÷»úÅäÖÃ

lighttpd.conf½âÊÍ

   1. server.use-ipv6 = "disable" # ȱʡΪ½ûÓÃ
   2. server.event-handler = "linux-sysepoll" # Linux»·¾³ÏÂepollϵͳµ÷ÓÿÉÌá¸ßÍÌÍÂÁ¿
   3. #server.max-worker = 10 # Èç¹ûÄãµÄϵͳ×ÊԴûÅÜÂú£¬¿É¿¼ÂÇ...

    Apache±àÒë°²×°²ÎÊý×¢½â


Apache±àÒë²ÎÊý×¢½â
./configure //ÅäÖÃÔ´´úÂëÊ÷
--prefix=/usr/local/apache2 //ÌåϵÎÞ¹ØÎļþµÄ¶¥¼¶°²×°Ä¿Â¼PREFIX £¬Ò²¾ÍApacheµÄ°²×°Ä¿Â¼¡£
--enable-module=so //´ò¿ª so Ä£¿é£¬so Ä£¿éÊÇÓÃÀ´Ìá DSO Ö§³ÖµÄ apache ºËÐÄÄ£¿é
--enable-deflate=shared //Ö§...

    Apache PreforkºÍWorkerģʽµÄÐÔÄܱȽϲâÊÔ

ApacheÔÚÅäÖñàÒëʱ¿ÉÒÔ×ÔÖ÷µÄÑ¡ÔñÏëҪʹÓõÄMPMÄ£¿é£¬Ê¹ÓÃ./configure --with-mpm=MPMÃüÁî¡£ÎÒÃÇÖ÷ÒªÁ˽âpreforkºÍworkerÕâÁ½ÖÖMPMÄ£¿é¡£
Prefork
Èç ¹û²»Óá°--with-mpm¡±ÏÔʽָ¶¨Ä³ÖÖMPM£¬prefork¾ÍÊÇUnixƽ̨ÉÏȱʡµÄMPM¡£ËüËù²ÉÓõÄÔ¤ÅÉÉú×Ó½ø³Ì·½Ê½£¬Óõ¥¶À...

    apacheѹËõ¼¼ÊõÓëÅäÖÃ

apache2.0ÖØÒªÈÕ³Ì
2.0a1 Mar 2000 Ê×´ÎÍƳöµÚÒ»°æ±¾ The first Apache 2.0 alpha was launched at the final session of the ApacheCon 2000 conference. A number of ASF members on stage updated the website and copied the distribution files into the corr...

    apache¡¢php¡¢mysqlÔ´Âë°²×°

libjpeg-devel-6b-33

freetype-devel-2.1.9-6.el4

zlib-devel-1.2.1.2-1.2

libpng-devel-1.2.7-3.el4_5.1

gd-devel-2.0.28-5.4E

gd-2.0.28-5.4E

glibc-devel-2.3.4-2.39

gcc-3.4.6-9

glibc-kernheaders-2.4-9.1.100.EL

glibc-headers-2.3...

    MysqlÅäÖÃÎļþÏê½â

¡¡¡¡MySQLÊý¾Ý¿â5.0µÄmy.cnfÅäÖÃÑ¡Ïî¸ÅÊö:

mysqld³ÌÐò¨CĿ¼ºÍÎļþ

basedir = path ʹÓøø¶¨Ä¿Â¼×÷Ϊ¸ùĿ¼(°²×°Ä¿Â¼)¡£

character-sets-dir = path ¸ø³ö´æ·Å×Å×Ö·û¼¯µÄĿ¼¡£

datadir = path ´Ó¸ø¶¨Ä¿Â¼¶ÁÈ¡Êý¾Ý¿âÎļþ¡£

pid-file = filename Ϊmys...

    Çå³ýÖ¸¶¨squid»º´æÎļþµÄ½Å±¾

Squid web»º´æ¼ÓËÙÈí¼þÄ¿Ç°ÒѾ­ÊÇÐÂÀË¡¢ËѺü¡¢ÍøÒ׵ȸ÷´óÍøÕ¾¹ã·ºÓ¦Óá£Squid»áÔÚÉèÖõĻº´æĿ¼Ï½¨Á¢¶à¸öĿ¼£¬Ã¿Ò»¸öĿ¼ÏÂÓÖ½¨Á¢¶à¸öĿ¼£¬È»ºó²ÅÔÚ×îÀï²ãµÄĿ¼Öдæ·Å»º´æÎļþ£¨object£©¡£squid»á¸ù¾ÝÓû§ÇëÇóÍøÒ³µÄURL½øÐйþÏ££¬Éú³É»º´æÎļþ£¬´æ·ÅÔÚijһ¸öÄ¿...

    ¼òµ¥·À·¶SYN_RECV¹¥»÷

SYN¹¥»÷ÊÇ×î³£¼ûÓÖ×îÈÝÒ×±»ÀûÓõÄÒ»ÖÖ¹¥»÷ÊÖ·¨¡£ÏàÐźܶàÈË»¹¼ÇµÃ2000ÄêYAHOOÍøÕ¾ÔâÊܵĹ¥»÷ÊÂÀý£¬µ±Ê±ºÚ¿ÍÀûÓõľÍÊǼòµ¥¶øÓÐЧµÄSYN¹¥»÷£¬ÓÐЩÍøÂçÈä³æ²¡¶¾ÅäºÏSYN¹¥»÷Ôì³É¸ü´óµÄÆÆ»µ¡£±¾ÎĽéÉÜSYN¹¥»÷µÄ»ù±¾Ô­Àí¡¢¹¤¾ß¼°¼ì²â·½·¨£¬²¢È«Ãæ̽ÌÖ SYN¹¥»÷·À·¶¼¼Êõ¡£

    ÓÐ¹Ø SYN_RECV µÄ֪ʶºÍ·ÀÖ¹DOS¹¥»÷

ÏàÐźܶà·þÎñÆ÷¶¼Åöµ½¹ýDOS¹¥»÷,·þÎñÆ÷ÒòÁ¬½Ó¹ý¶à¶øÎÞ·¨ÏàÓ¦,²é¿´Á¬½Ó״̬,¾Í»áÓÐN¶à SYN_RECV,ÏÂÃæ¾Í̸ÏÂÓÐ¹Ø SYN_RECV ·½ÃæµÄ¶«¶«!

    apacheÖв¢·¢¿ØÖƲÎÊýpreforkÀí½âºÍµ÷ÓÅ

Ò»¸öapacheÓÐlinuxϵIJ¢·¢²»ÊǺܸߵÄ,´óÔ¼µ½3KµÄÑù×Ó,ÆÕͨµÄ·þÎñÆ÷¶¼»á²»Í¬³Ì¶ÈµÄ³öÏÖÎÊÌâ.apacheÓйز¢·¢¿ØÖÆÖ÷ÒªÊÇ preforkºÍworker¶þ¸öÆäÖÐÒ»¸öÀ´¿ØÖÆ.ÎÒÃÇ¿ÉÒÔʹÓÃhttpd -lÀ´È·¶¨µ±Ç°Ê¹ÓõÄMPMÊÇprefork.c,»¹ÊÇWorker.c.ÏÂÃæÊÇapacheÖÐÓйØpreforkµÄÅäÖÃ.ÏÂÃæÊÇ...

    vmstat ÃüÁîÏê½â

vmstat ÊÇÓÃÀ´ÊµÊ±²é¿´ÄÚ´æʹÓÃÇé¿ö,·´Ó³µÄÇé¿ö±ÈÓÃtopÖ±¹ÛһЩ.
Èç¹ûÖ±½ÓʹÓÃ,Ö»Äܵõ½µ±Ç°µÄÇé¿ö,×îºÃÓøöʱ¼ä¼ä¸ôÀ´²É¼¯
vmstat T ÆäÖÐTÓþßÌåµÄʱ¼ä±êʾ,µ¥Î»ÊÇ Ãë ÀýÈç:vmstat 5 ±í¸ñÿ¸ô5Ãë²É¼¯Ò»´Î.
ÕâÑùÔÚˢеÄʱºò¾ÍÄܱȽÏϵͳµÄ¿´µ½ÄǸöÁв»Õý³£µÄ
pr...

    apache·þÎñÆ÷µÄtime_waitºÍfin_wait1¹ý¶àµÈÎÊÌâ


1¡£time_wait״̬¹ý¶à¡£
    ͨ³£±íÏÖΪapache·þÎñÆ÷¸ºÔظߣ¬wÃüÁîÏÔʾload average¿ÉÄÜÉÏ°Ù£¬µ«ÊÇweb·þÎñ»ù±¾Ã»ÓÐÎÊÌ⡣ͬʱsshÄܹ»µÇ½£¬µ«ÊÇ·´Ó¦·Ç³£³Ù¶Û¡£
Ô­Òò£º×î¿ÉÄܵÄÔ­ÒòÊÇhttpd.confÀïÃækeepaliveûÓпª£¬µ¼ÖÂÿ´ÎÇëÇó¶¼Òª½¨Á¢ÐµÄtcp...

    Freebsd+ipfw2+Apache½â¾öfin_wait_2Ì«¶àÎÊÌâ

Freebsd+ipfw2+ApacheÓÐʱ»áÓÐһЩÎÊÌâ: µ±ÏµÍ³ÔËÐÐÒ»¶Îʱ¼äºó,±ÈÈ缸Ìì»òÕß¼¸Öܺó,ÓÃÃüÁînetstat -an»á¿´µ½Ðí¶à´¦ÓÚfin_wait_2״̬µÄËÀÁ¬½Ó,ÕâЩÁ¬½ÓËæ×Åʱ¼äÔö³¤»áÔ½À´Ô½¶à,¶øÇÒËƺõÎÞ·¨Ïû³ý,ÎÞÂÛÓÃipfw½øÐзÀ»ðǽ¹æÔòµÄÖØÐÂÉ趨 (±ÈÈçipfw flushÒ»ÏÂ),»òÕßÓÃifcon...

    linuxÖÐGD¿âµÄ°²×°

ΪÁË°²×°·½±ã,ÎÒ×Ô¼ºÐ´ÁËÒ»·ÖGD°²×°µÄ¹ý³Ì,ÏÖÔÚ·¢±í³öÀ´.Ï£ÍûÅóÓÑÃǶàÌáÒâ¼û,лл! Ô­À´GD²»Ö§³ÖWBMP,ÏÖÔÚÀ©³äGDÖ§³ÖWBMP.

    ¹ØÓÚ´óÐ͸߲¢·¢¸ß¸ºÔØÍøÕ¾µÄϵͳ¼Ü¹¹ÎÊ´ðÕûÀí


.gcomment { border-left:none; vertical-align:middle; border-right:none; margin-bottom:3px; border-bottom:1px solid #f3f3f3; background-color:#F7F7F7; padding:3px; }
.ucomment { border-left:none; border-right:none; margin-bottom:3px; border-bott...

    ´óÐ͸߲¢·¢¸ß¸ºÔØÍøÕ¾µÄϵͳ¼Ü¹¹

¡¡¡¡ÎÒÔÚCERNET×ö¹ý²¦ºÅ½ÓÈëƽ̨µÄ´î½¨£¬¶øºóÔÚYahoo&3721´ÓʹýËÑË÷ÒýÇæÇ°¶Ë¿ª·¢£¬ÓÖÔÚMOP´¦Àí¹ý´óÐÍÉçÇøèÆË´óÔÓ»âµÄ¼Ü¹¹Éý¼¶µÈ¹¤×÷£¬Í¬Ê±×Ô¼º½Ó´¥ºÍ¿ª·¢¹ý²»ÉÙ´óÖÐÐÍÍøÕ¾µÄÄ£¿é£¬Òò´ËÔÚ´óÐÍÍøÕ¾Ó¦¶Ô¸ß¸ºÔغͲ¢·¢µÄ½â¾ö·½°¸ÉÏÓÐһЩ»ýÀۺ;­Ñ飬¿ÉÒԺʹó¼ÒÒ»Æð...