【问题标题】:Plone 4.1.4 Site Error: Resource not foundPlone 4.1.4 站点错误:找不到资源
【发布时间】:2012-03-17 14:22:41
【问题描述】:

有点卡住了:(提前谢谢

预期结果:

  • atitlanorganics.com 应该呈现我的新克隆网站。

实际结果:

  • 站点错误:找不到源

堆栈:

  • Ubuntu sqeeze/sid
  • Apache 2.2.14
  • Python 2.6.7(r267:88850,2012 年 3 月 12 日,20:57:20)[GCC 4.4.3]
  • Plone 4.1.4 最近从 4.1.3 升级
  • CMF 2.2.5 Zope 2.13.12
  • PIL 1.1.6
  • PloneFormgen 1.7.0
  • Products.Carousel 2.1
  • Buildout Here: http://pastebin.com/YLBxiTLp

疑难解答: 当我转到 atitlanorganics.com 时接收网站“站点错误:找不到资源” 但是当我直接连接到 plone 时工作正常:http://72.14.188.28:40000/AtitlanOrganics

当我尝试直接连接到 atitlanorganics.com 时,我的浏览器中出现此错误::

> <h2>Site Error</h2> <p>An error was encountered while publishing this
> resource. </p> <p><strong>Resource not found</strong></p> Sorry, the
> requested resource does not exist.<p>Check the URL and try
> again.</p><p><b>Resource:</b> atitlanorganics.com GET</p> <hr
> noshade="noshade"/> <p>Troubleshooting Suggestions</p> <ul> <li>The
> URL may be incorrect.</li> <li>The parameters passed to this resource
> may be incorrect.</li> <li>A resource that this resource relies on may
> be encountering an error.</li> </ul> <p>For more detailed information
> about the error, please refer to the error log. </p> <p>If the error
> persists please contact the site maintainer. Thank you for your
> patience. </p>

Apache 访问日志::

> root@li54-28:/var/log/apache2# tail -n 0 -f access.log
> 
>     > 190.148.214.174 - - [16/Mar/2012:21:54:10 -0600] "GET / HTTP/1.1" 404 792 "-" "Mozilla/5.0 (Windows NT 5.1; rv:11.0)
> Gecko/20100101
>     > Firefox/11.0"
>     > 190.148.214.174 - - [16/Mar/2012:21:54:12 -0600] "GET / HTTP/1.1" 404 791 "-" "Mozilla/5.0 (Windows NT 5.1; rv:11.0)
> Gecko/20100101
>     > Firefox/11.0"
>     > 190.148.214.174 - - [16/Mar/2012:21:54:13 -0600] "GET / HTTP/1.1" 404 791 "-" "Mozilla/5.0 (Windows NT 5.1; rv:11.0)
> Gecko/20100101
>     > Firefox/11.0"

Apache 错误日志::

> root@li54-28:/var/log/apache2# tail -n 0 -f error.log
> ***No errors

Plone 控制台日志:: 将浏览器定向到 atitlanorganics.com 时

> shadqudsi@li54-28:~/atitlanorganics.com$ bin/instance fg 2012-03-16
> 21:25:32 INFO ZServer HTTP server started at Fri Mar 16 21:25:32 2012
>         Hostname: 0.0.0.0
>         Port: 40000 2012-03-16 21:25:35 WARNING SecurityInfo Conflicting security declarations for "setText" 2012-03-16 21:25:35
> WARNING SecurityInfo Class "ATTopic" had conflicting security
> declarations
> /home/shadqudsi/buildout-cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/config.py:706:
> UserWarning: The set_schema option of the <requ ire /> directive is
> not supported in Zope 2. Ignored for <class
> 'Products.Carousel.content.carouselbanner.CarouselBanner'>   actions =
> self.handler(context, **args) 2012-03-16 21:25:52 INFO PloneFormGen
> Patching plone.app.portlets ColumnPortletManagerRenderer to not catch
> Retry exceptions 2012-03-16 21:25:53 INFO Zope Ready to handle
> requests
> ***Notice the requests show in the apaches access.log but never in apaches error.log or plones bin/plone fg output

为 atitlanorganics.com 启用 Apache 站点的配置::

> root@li54-28:/etc/apache2/sites-enabled# ll atitlanorganics.com
> lrwxrwxrwx 1 root root 38 2012-02-13 07:04 atitlanorganics.com ->
> ../sites-available/atitlanorganics.com
> root@li54-28:/etc/apache2/sites-enabled#
> root@li54-28:/etc/apache2/sites-enabled# tail atitlanorganics.com
>     <Proxy *>
>         Allow from all
>     </Proxy>  RewriteEngine On
>     RewriteRule ^(.*) http://127.0.0.1:40000/VirtualHostBase/http/%{HTTP_HOST}:80/atitlanorganics.com/VirtualHostRoot/$1
> [P,L]
>     ErrorDocument 503 "<!DOCTYPE html><head><title>Site down</title></head><h1>Our webmaster isnt very good. Get a rope!</h1>"
> </VirtualHost>

Plone 控制台日志:: 将浏览器定向到 http//72.14.188.28:40000/AtitlanOrganics 时

> shadqudsi@li54-28:~/atitlanorganics.com$ bin/instance fg 2012-03-16
> 21:25:32 INFO ZServer HTTP server started at Fri Mar 16 21:25:32 2012
>         Hostname: 0.0.0.0
>         Port: 40000 2012-03-16 21:25:35 WARNING SecurityInfo Conflicting security declarations for "setText" 2012-03-16 21:25:35
> WARNING SecurityInfo Class "ATTopic" had conflicting security
> declarations
> /home/shadqudsi/buildout-cache/eggs/zope.configuration-3.7.4-py2.6.egg/zope/configuration/config.py:706:
> UserWarning: The set_schema option of the <requ  ire /> directive is
> not supported in Zope 2. Ignored for <class
> 'Products.Carousel.content.carouselbanner.CarouselBanner'>   actions =
> self.handler(context, **args) 2012-03-16 21:25:52 INFO PloneFormGen
> Patching plone.app.portlets ColumnPortletManagerRenderer to not catch
> Retry exceptions 2012-03-16 21:25:53 INFO Zope Ready to handle
> requests 2012-03-16 22:18:04 INFO CMFFormController
> /home/shadqudsi/buildout-cache/eggs/Products.PloneFormGen-1.7.0-py2.6.egg/Products/PloneFormGen/skins/PloneFormfg_base_view_p3.cpt:
> No default action specified for status success, content type ANY. 
> Users of IE can submit pages using the return key, resulting in noton
> in the REQUEST.  Please specify a default action for this case.
> 
> 2012-03-16 22:18:04 INFO CMFFormController
> /home/shadqudsi/buildout-cache/eggs/Products.PloneFormGen-1.7.0-py2.6.egg/Products/PloneFormGen/skins/PloneFormfg_base_view_p3.cpt:
> No default action specified for status success, content type ANY. 
> Users of IE can submit pages using the return key, resulting in noton
> in the REQUEST.  Please specify a default action for this case.

我将启用 apache 站点的 atitlanorganics.com 配置与 jaibalito.org 的已知良好配置进行了比较。唯一的区别是目录/域/端口引用。

> root@li54-28:/etc/apache2/sites-available# diff atitlanorganics.com
> jaibalito.org
> 
> > 2,4c2,4 <       ServerAdmin webmaster@atitlanorganics.com <        
> > ServerName atitlanorganics.com <         ServerAlias
> > www.atitlanorganics.com
> > ---
> > >       ServerAdmin webmaster@jaibalito.org
> > >         ServerName jaibalito.org
> > >         ServerAlias www.jaibalito.org 6c6 <       DocumentRoot /home/shadqudsi/atitlanorganics.com/www
> > ---
> > >       DocumentRoot /home/naderehnilforoushan/jaibalito.org/www 11c11 <       <Directory /home/shadqudsi/atitlanorganics.com/www/>
> > ---
> > >       <Directory /home/naderehnilforoushan/jaibalito.org/www/> 48c48 <     RewriteRule ^(.*)
> > http://127.0.0.1:40000/VirtualHostBase/http/%{HTTP_HOST}:80/atitlanorganics.com/VirtualHostRoot/$1
> > [P,L]
> > ---
> > >     RewriteRule ^(.*) http://127.0.0.1:29000/VirtualHostBase/http/%{HTTP_HOST}:80/jaibalito.org/VirtualHostRoot/$1
> > [P,L] 50c50 <     ErrorDocument 503 "<!DOCTYPE html><head><title>Site
> > down</title></head><h1>Our webmaster isnt very good. Get a rope!</h1>"
> > ---
> > >     ErrorDocument 503 "<!DOCTYPE html><head><title>Jaibalito.org Under Repair</title></head><h1>Jaibalito.org under going site
> > maintenance: </h1>"

【问题讨论】:

  • 感谢您为我们提供详细信息! :-)
  • 是的!这可能是我在这里见过的写得最好的 Plone 问题 - 除了不包括 Plone 网站实际名称的小细节 :-)
  • 老实说,我在专家论坛发帖有点紧张...我很高兴我做到了!感谢您的道具,我期待成为这个社区的一员。

标签: plone


【解决方案1】:

问题已解决。

我们在朋友的帮助下度过了难关;=)

分辨率: 我的 Apache “重写规则”和我的 Plone “站点名称”之间存在冲突。

具体来说:

> RewriteRule ^(.*)
> http://127.0.0.1:40000/VirtualHostBase/http/%{HTTP_HOST}:80/atitlanorganics.com/VirtualHostRoot/$1

http://72.14.188.28:40000/AtitlanOrganics

请注意 atitlanorganics.com 与 A​​titlanOrganics 不匹配!!啊哈!!我将我的 apache 配置更改为:

> RewriteRule ^(.*)
> http://127.0.0.1:40000/VirtualHostBase/http/%{HTTP_HOST}:80/AtitlanOrganics/VirtualHostRoot/$1

工作出色! Ploniverse 再次迎来和平。

【讨论】:

  • 由于您没有告诉我们您的 Plone 站点名称,因此不可能知道这一点。如果 jaibalito.org 规则有效,则似乎暗示您正在为 AtitlanOrganics 站点使用相同的命名方案(尽管值得注意的是,这种情况在域名中并不重要,但在 Plone 站点名称中确实如此)。
【解决方案2】:

你的 zope 有 VirtualHostMonster 吗?

【讨论】:

  • 是的,我愿意。但我没有使用它。绕过apache?
  • 我不明白你的问题(也就是说,你有一个“?”但它实际上不是一个问题!)。需要一个 VirtualHostMonster 才能使您的重写规则起作用。所以这是需要问的第一个问题,
猜你喜欢
  • 2012-08-17
  • 1970-01-01
  • 2011-12-27
  • 1970-01-01
  • 1970-01-01
  • 2015-11-24
  • 2012-03-06
  • 2018-07-18
  • 2015-11-24
相关资源
最近更新 更多