apache反向代理设置

| |
[不指定 October 24, 2006 11:06 | by jed ]
首先下载apache 源文件。2.0.54即可。

   编译的时候加上如下参数:
     ./configure --prefix=/usr/local/apache2
     --enable-rewrite=shared
     --enable-proxy=shared

    其中:prefix是安装目录;enable-rewrite 和 enable-proxy分别是启用了url重写和代理功能

    在httpd.conf文件中加入如下代码:
    ServerName map.sdta.cn
    ErrorLog /usr/local/logs/httpd-error_log
    TransferLog /usr/local/logs/httpd-access_log
    RewriteEngine on
    #ProxyRequestes off
    #UseCanonicalName off
    RewriteRule ^/(.*)$ http://192.168.0.1:7001/$1 [P,L]
    即可将所有请求转发至192.168.0.1:7001上


服务器技术 | 评论(0) | 引用(0) | 阅读(1257)
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
昵称   密码   游客无需密码
网址   电邮   [注册]