2010-08-07 29 views
0

我对Django + uWSGI + Cherokee没有问题。 BUt我想在提交任何框架之前尝试挂接。什么可能导致重定向循环与塔+ uWSGI +切诺基?

我跟着从pylonshq.com教程 - 1.0/gettingstarted

我运行与粘贴挂架时遇到了什么问题。

因此,我使用的指令与从uWSGI运行projects.unbit.it挂架 - uwsgi /维基/ UsePaste

这是我与切诺基使用的源解释线(连接127.0.0.1:5000):

uwsgi -s 127.0.0.1:5000 --paste config:/var/www/pylons/example/development.ini -H /var/www/pylons/ -M 

我的切诺基vServer的是bokken.test.com与根目录: 在/ var/WWW /挂架/例子/例子/公共 (我试过有和没有斜线)

我的“目录/“规则句柄r设置为uWSGI源,但没有为特定处理程序设置根目录。

当我访问bokken.test.com时,出现重定向循环错误。

谷歌浏览器:

The webpage at http://bokken.test.com// has resulted in too many redirects (Notice the extra slash). 
Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects. 

error.log中:

*** Starting uWSGI 0.9.5.4 (32bit) on [Sat Aug 7 19:01:51 2010] *** 
compiled with version: 4.4.3 
Python version: 2.6.5 (r265:79063, Apr 16 2010, 13:28:26) 
[GCC 4.4.3] 
your memory page size is 4096 bytes 
allocated 372 bytes (0 KB) for 1 request's buffer. 
Setting PythonHome to /var/www/pylons/... 
binding on TCP port: 5000 
your server socket listen backlog is limited to 64 connections 
initializing hooks...done. 
Loading paste environment: config:/var/www/pylons/example/development.ini 
application 0 (/) ready 
setting default application to 0 
spawned uWSGI master process (pid: 1278) 
spawned uWSGI worker 1 (pid: 1280) 
[pid: 1280|app: 0|req: 1/1] 192.168.0.198() {52 vars in 926 bytes} [Sat Aug 7 19:01:55 2010] GET/=> generated 433 bytes in 7 msecs (HTTP/1.1 301) 2 headers in 95 bytes (0 async switches on async core 0) 

与Django的,没有一个教程,我发现指定uwsgi.xml或.wsgi脚本。 我不确定需要更改哪些内容。

回答

0

你说你已经将Cherokee vServer的文件根目录设置为你的Pylons项目的/ example/public目录。这似乎是一个问题 - 在试图匹配控制器之前,Pylons会在公共目录中查找要提交的文件,以便您可以为将来的问题设置自己的位置。 Pylons应用程序的根文件夹应该是你指向vServer的地方,并让Pylons处理它自己的目录树块。

此外,你一定需要一个.wsgi脚本 - 你的问题的最后一点意味着你没有?这有点令人困惑 - 请澄清。

+0

感谢您的回应,但我早就放弃了切诺基,并转而使用Nginx。但是,由于我的目录路径不正确,您的响应仍然有效,但我希望Web服务器在不通过挂架的情况下为静态文件提供服务。但是,至少对我而言,在nginx中设置起来更容易。 – 2010-11-04 15:36:59

+0

然后,祝你用nginx好运。 :) – 2010-11-04 19:54:21