優化(huà)apache

天遠(yuǎn)科技  發表于:2015-12-31  分(fēn)類:Web Serve  閱讀(3575)  贊同35

增加緩存,增加緩存模塊

/usr/local/apache/bin/apxs -i -a -c /usr/local/src/httpd-2.2.31/modules/metadata/mod_expires.c


配置/usr/local/apache/conf/httpd.conf

增加一(yī)行

<IfModule mod_expires.c>
  ExpiresActive    on
  ExpiresDefault A600
  ExpiresByType image/x-icon A2592000
  ExpiresByType application/x-javascript A2592000
  ExpiresByType image/gif A2592000
  ExpiresByType image/jpeg A2592000
  ExpiresByType text/css A2592000
  ExpiresByType image/jpg A2592000
  ExpiresByType image/png A2592000
  ExpiresByType text/html A600
</IfModule>

增加

ServerTokens Prod
ServerSignature off
TraceEnable off
HostnameLookups Off
EnableSendfile On




在線聯系
點擊這(zhè)裏給我發消息
點擊這(zhè)裏給我發消息
關(guān)注我們