⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 l2.html

📁 写给JSP初级程序员的书
💻 HTML
字号:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<meta name="description" content="Java,JDBC,EJB,Open Source,jdk,rmi">
<meta name="Keywords"
content="Java, servlets, Java servlet, Javascript, ActiveX, VRML,
        applet, applets, directory, news, jdbc, applications, 
        Java applications, Java developer, Java development, developer, 
        classes, Jars.com, Jars, intranet, Java applet, Javabeans, 
        Java products, JDK, Java development kit, java development environment, JIT,
        JavaPlan, enterprise tools, JVM, Java Virtual Machine, Java resources, 
        SUN, CGI, Perl, database, network, html,
        xml, dhtml, rating, ratings, review, jars, cgi, programming,
        software review, software rating">
<title>csdn_为apache加速</title>
<style>
.news {   BACKGROUND: #007cd3;  font-family: "宋体"; font-size: 9pt }
.t {  font-family: "宋体"; font-size: 9pt }
.t1 { color:#007cd3;  font-family: "宋体"; font-size: 9pt }
.white { font-family: "宋体"; font-size: 9pt;color:#FFFFFF }
.red { font-family: "宋体"; font-size: 9pt;color:#FF0000 }
A:visited {color:#0000FF}
A:hover {color: #ff6666; text-decoration: none}
.text {font-size: 12px; line-height: 160%; font-family: "宋体"}
.text1 {color:#000000; font-size: 12px; line-height: 130%; font-family: "宋体"; text-decoration: none}
.text1:visited {color:#000000}
.text1:hover {color: #000000}
.text2 {color:#000000; font-size: 12px; line-height: 130%; font-family: "宋体"; text-decoration: none}
.text2:visited {color:#000000}
.text2:hover {color: #000000}
.text3 {font-size: 12px; line-height: 100%; font-family: "宋体"; text-decoration: none}
.large {font-size: 14.8px; line-height: 130%}
</style>
</head>

<body


<center>




  <tr>
    <td WIDTH="100%" VALIGN="TOP">
      <tr>
        <td WIDTH="100%" CLASS="white"></td>
      </tr>
    
      <tr>
        <td WIDTH="50%" bordercolor="#FFFFFF" CLASS="t1" bgcolor="#F0F0F0" align="center" nowrap>为apache加速</td>
        <p><td WIDTH="50%" bordercolor="#FFFFFF" CLASS="t1" bgcolor="#F0F0F0" align="center" nowrap>作者:邱文宇</td></p>
      </tr>
      <tr>        
      	<td WIDTH="100%" bordercolor="#FFFFFF" CLASS="t" bgcolor="#F0F0F0" colspan="2">
        <tr> 
          <td width="595" height=3  background="../../images/line.gif" tppabs="http://www.chinajavaworld.com/images/line.gif"></td>
        </tr>
      <br>
 你知道吗,如果你的web server是采用apache那你就有机会通过安装一个软件模块提高你的网站访问速度,最大能有10倍之多!这可不是吹牛,你看看原理就明白了。这个神通广大的模块就是mod_gzip. 它通过用和gzip一样的压缩算法对apache发出的页面进行压缩,可能的话可以把页面压缩成为原来大小的十份之一。哪,如果10K的页面只要传1K这不就是提速10倍嘛。当然一般网页只可以达到3-6倍。那也很不错。对吧。连google这样一个大的网站都采用这个技术。你还不快跟上?<BR><BR>  这样一个好东东,来来来,我告诉你如何安装:分3步,1、下载,2、修改配置,3、测试。<BR><BR>1、 下载<BR><BR>到http://www.remotecommunications.com/apache/mod_gzip 下载mod_gzip.c 还有它的补丁。<BR><BR>2、 安装, 配置<BR><BR>  把mod_gzip放到你的apache的源代码目录下,新建一个mod_gzip目录如果需要补丁(针对1.3.17.la版) 还需运行:<BR>patch mod_gizp.c <BR>  按你需要,在配置中选择动态DSO或静态编译进apache系统。如何处理在README中讲得很清楚,如-add-module=mod_gzip.c, make,make install等等。这里不多讲。<BR><BR>把下列配置加入httpd.conf尾部。<BR><BR># MOD_GZIP configuration<BR>mod_gzip_on Yes<BR>mod_gzip_minimum_file_size 1002<BR>mod_gzip_maximum_file_size 0<BR>mod_gzip_maximum_inmem_size 60000<BR>mod_gzip_item_include mime &quot;application/x-httpd-php&quot;<BR>mod_gzip_item_include mime text/*<BR>mod_gzip_item_include mime &quot;httpd/unix-directory&quot;<BR>mod_gzip_dechunk Yes<BR>mod_gzip_temp_dir &quot;/tmp&quot;<BR>mod_gzip_keep_workfiles No<BR>mod_gzip_item_include file &quot;\.php3$&quot;<BR>mod_gzip_item_include file &quot;\.txt$&quot;<BR>mod_gzip_item_include file &quot;\.html$&quot;<BR>mod_gzip_item_exclude file &quot;\.css$&quot;<BR>mod_gzip_item_exclude file &quot;\.js$&quot;<BR><BR><BR>在保存修改后运行<BR>…/bin/apachectl configtest确保配置修改无误。<BR>然后用 apachectl restart 指令重起服务。<BR><BR>3、 修改,测试<BR><BR>  在宣布做好了之前在测试一下是优秀程序员的习惯。为了尽量不影响你的用户的浏览,我们可以用把新的apache驱动在8080端口上或者用指令控制mod_gzip起作用的目录,而不是一下子全用mod_gzip.<BR>用法如下:<BR><BR><BR>MOD_GZIP configuration<BR><BR><BR>  你再用IE4或netscape认真的全面测试一遍,没有问题后你就可以让你的用户很开心的发现'XX网站现在好快哦。'<BR><BR>  Mod_gzip真的很神奇,100K的HTML大文档只要12K就可以传到用户端了。越先采用这个技术你的用户对你的网站的高速度印象就越深。不过有所得必有所失,由于解压是在客户端进行的,效果和用户的浏览器有一定关系。笔者测试了MSIE4,5,5.5,netscape 4.5 , 6都运行得很好. 不过java,jpg,gif等等是没法压缩的。
      <br>
      <br>
    </td>
  </tr>
  <tr>
    <td width="630" align="right" valign="top"> 
      
        <tr> 
          <td width="595" height=3  background="../../images/line.gif" tppabs="http://www.chinajavaworld.com/images/line.gif"></td>
        </tr>
      <br><!--prevpage-->
      &nbsp; &nbsp; 
    </td>
  </tr>        </td>
      </tr>
    </td>
  </tr>
</table>

</div>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -