专注于互联网--专注于架构

最新标签
网站地图
文章索引
Rss订阅

首页 »web服务器 » apacherewrite:Linux下Apache安装/增加mod_rewrite模块 »正文

apacherewrite:Linux下Apache安装/增加mod_rewrite模块

来源: 发布时间:星期日, 2009年1月4日 浏览:6次 评论:0
如果你服务器思路方法
 
  以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应指定绝对路径在你当前正在使用apachebin目录里
 
  # /usr/local/apache/bin/apxs -i -a -n mod_rewrite mod_rewrite.la
 
  如果没有什么应该在你apachemodules目录中编译出个mod_rewrite.so文件
 
  编辑httpd.conf文件确认httpd.conf中已经包含mod_rewrite.so加载语句如下:
 
  LoadModule rewrite_module modules/mod_rewrite.so
 
  这时apache应该已经支持rewrite了
 
  vicos注:完成的后记得重启服务器apache.


0

相关文章

读者评论

发表评论

  • 昵称:
  • 内容: