Plone 4 apache 重写代理可以工作但不显示图像
我已经成功设置了 plone 4 并正在使用 apache2 重写,它似乎可以工作。问题是该网站的内容无法正确显示。
NameVirtualHost *:80
<IfModule mod_proxy.c>
<VirtualHost *:80>
ServerName elzwhere.net
RewriteEngine On
RewriteRule /static - [L]
RewriteRule ^/(.*) \
http://localhost:8080/VirtualHostBase/http/%{SERVER_NAME}:80/et/VirtualHostRoot/%1 [L,P]
<Proxy *>
Order Allow,Deny
Allow from all
</Proxy>
</VirtualHost>
</IfModule>
如果您尝试连接到elzwhere.net,您就会看到我在说什么。我不太确定这里发生了什么。
提前致谢。
I have successfully setup plone 4 and am using apache2 rewrite and it seems to work. The problem is that the content for the site does not show up correctly.
NameVirtualHost *:80
<IfModule mod_proxy.c>
<VirtualHost *:80>
ServerName elzwhere.net
RewriteEngine On
RewriteRule /static - [L]
RewriteRule ^/(.*) \
http://localhost:8080/VirtualHostBase/http/%{SERVER_NAME}:80/et/VirtualHostRoot/%1 [L,P]
<Proxy *>
Order Allow,Deny
Allow from all
</Proxy>
</VirtualHost>
</IfModule>
If you try to connect to elzwhere.net you will see what I'm talking about. I'm not exactly sure what is going on here.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 VirtualHostRoot 之后尝试 $1 而不是 %1。
Try $1 instead of %1 after the VirtualHostRoot.
您的重写规则有错误;使用
$1
进行末尾的正则表达式替换。以后最好使用RewriteRule Witch来构建你的Zope重写规则,它每次都会完美地构建正确的规则!
You have an error in your rewrite rule; use
$1
for the regular expression substitution at the end there.In future, better use the RewriteRule Witch to construct your Zope rewrite rules, it constructs the correct rule flawlessly every time!