配置zope的VHM和apache rewrite

1,进入zope的ZMI中
2,添加一个Virtual Host Monster,ID 叫做VHM
3,创建目录vhm_test
4,进入目录vhm_test,创建一个DTML method ,ID叫做index_html
内容如下:
<html>
<body>
<table border="1">
<tr>
<td>Absolute URL</td>
<td><dtml-var absolute_url></td>
</tr>
<tr>
<td>URL0</td>
<td><dtml-var URL0></td>
</tr>
<tr>
<td>URL1</td>
<td><dtml-var URL1></td>
</tr>
</table>
</body>
</html>

5,保存,View
   会在浏览器中出现
    Absolute URL http://localhost:8080/vhm_test
    URL0 http://localhost:8080/vhm_test/index_html
    URL1 http://localhost:8080/vhm_test
6,配置apache的rewrite功能
    编辑apache的httpd.conf文件
   
    Listen 80下面
 添加如下代码
NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.example.com
RewriteEngine On
RewriteRule ^/(.*) http://127.0.0.1:8080/VirtualHostBase/http/www.example.com:80/vhm_test/VirtualHostRoot/
</VirtualHost>

这里假设你的zope监听8080端口,并且apache启用了rewrite功能
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值