问题描述
我有一个Plone站点名为 example.com
位于 /无功/网络/ Plone的
(我认为) 。我对位于站点的网站,提供虚拟主机(节选)以下设置:
I have a Plone site called example.com
located at /var/www/Plone
(I think). I have the following settings for the site located in sites-available for vhosts (excerpt):
<VirtualHost 10.0.1.4:8082>
ServerAdmin webmaster@localhost
ServerName wiedhas.noip.me
DocumentRoot /var/www/Plone
当我试图达到我的网站 wiedhas.noip.me
,阿帕奇负荷Plone的目录树,而不是我的Plone站点。我可以通过 /无功/网络/ Plone的
文件系统中浏览,但没有加载该网站。我不能DocumentRoot的设置为我的网站的正确的目录?任何帮助非常AP preciated。
When I try to reach my site wiedhas.noip.me
, apache loads the Plone directory tree and not my Plone site. I can browse through the file system of /var/www/Plone
but it is not loading the site. I must not have set the documentroot to the correct directory of my site? Any help much appreciated.
推荐答案
有关运行Plone的背后Apache和更多的这一个极好的实况。
This an excellent docu about running plone behind apache and more. http://docs.plone.org/manage/deploying/front-end/apache.html
一个简单的例子使用SSL,一个虚拟主机如何看起来像:
A simple example with ssl, how a vhost could look like:
<VirtualHost $IP:80>
ServerName my.domain.com
Redirect / https://my.domain.com
</VirtualHost>
<VirtualHost $IP:443>
ServerName my.domain.com
ErrorLog logs/my.domain.com-http-error.log
CustomLog logs/my.domain.com-http-access.log combined
Include vhosts.d/....ssl.inc
RewriteEngine On
RewriteRule ^/(.*) http://127.0.0.1:$PORT_OF_PLONE/VirtualHostBase/https/%{SERVER_NAME}:%{SERVER_PORT}/zodb/path/top/plone/VirtualHostRoot/$1 [P,L]
</VirtualHost>
中最重要的部分是重写规则:
The most important part is the rewrite rule:
RewriteRule ^/(.*) http://127.0.0.1:$PORT_OF_PLONE/VirtualHostBase/https/%{SERVER_NAME}:%{SERVER_PORT}/zodb/path/top/plone/VirtualHostRoot/$1 [P,L]
$ PORT_OF_PLONE =你的跑步Plone实例的端口
$PORT_OF_PLONE = Port of your running plone instance
/ ZODB /路径/上/ Plone的=这就是你添加Zope里Plone站点。
/zodb/path/top/plone = That's where you added the plone site in zope.
这篇关于如何正确设置的DocumentRoot Apache中的Plone服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!