服务器技术

 首页 > 服务器技术 > apache > Linux下Apache安装/增加mod_rewrite模块|apache-Apache教程

Linux下Apache安装/增加mod_rewrite模块|apache-Apache教程

分享到:
【字体:
导读:
          mod_rewrite.c,如果你的服务器apache还没有安装,那很简单,在编译apache时将mod_rewrite模块编译进去就可以,相关文档可以在http://man.chinaunix.net/newsoft hellip;hellip; ew/mod/mod_rewrite. html中找到。...

如果你的服务器apache还没有安装,那很简单,在编译apache时将mod_rewrite模块编译进去就可以,相关文档可以在http://man.chinaunix.net/newsoft …… ew/mod/mod_rewrite. html中找到。 如果你的apache已经安装好了,现在只想编译出mod_rewrite.so模块,在apache中进行加载,下面我们就介绍这个方法
 
  以Fedora操作系统进行举例:
 
  1)首次安装apache,在编译时增加——enable-rewrite选项。
 
  如。/configure ——prefix=/usr/local/apachel ——enable-so ——enable-mods-shared=all ——enable-rewrite ——enable-cache
 
  2)增加mod_rewrite模块
 
  # find . -name mod_rewrite.c //在apache的源码安装目录中寻找mod_rewrite.c文件
 
  # cd PATH/to/mod_rewrite.c //进入包含mod_rewrite.c文件的目录
 
  # /usr/local/apache/bin/apxs -c mod_rewrite.c //apxs应指定绝对路径,在你当前正在使用apache的bin目录里
 
  # /usr/local/apache/bin/apxs -i -a -n mod_rewrite mod_rewrite.la
 
  如果没有什么错误的话,应该在你的apache的modules目录中编译出一个mod_rewrite.so文件。
 
  编辑httpd.conf文件,确认httpd.conf中已经包含mod_rewrite.so的加载语句,如下:
 
  LoadModule rewrite_module modules/mod_rewrite.so
 
  这时,你的apache应该已经支持rewrite了。
 
  vicos注:完成之后,记得重启服务器apache.

"Linux下Apache安装/增加mod_rewrite模块"由第二电脑网原创提供,转载请注明:http://www.002pc.com/master/College/Server/Apache/17885.html

分享到:
更换apache到nginx的操作过程全记录|ngin...
客户有一个跑了3年多的组装pc服务器, 1.5G内存,p4 2.8G CPU,apache2.28+mod_PHP+mysql。95%的页面是静态页,每天大约有各类http请求500-1000万个(包括 html,js,Css,jpg,gif,php等)启用了gzip压缩,大部分时间负载在1.0以下,但是偶尔会暴涨,导致死机,严重情况一天down机N次。一直没找到原因,可能是服务器不行...
memcached全面剖析–2.理解memcached的内...
我是mixi株式会社研究开发组的前坂徹。上次的文章介绍了memcached是分布式的高速缓存服务器。本次将介绍memcached的内部构造的实现方式,以及内存的管理方式。另外,memcached的内部构造导致的弱点也将加以说明。 Slab Allocation机制:整理内存以便重复使用 最近的memcached默认情况下采用了名为Slab Allocator的机制分配...
  •         php迷,一个php技术的分享社区,专属您自己的技术摘抄本、收藏夹。
  • 在这里……