2007年09月26日 星期三 16:49
有人遇到过这样的问题么……
我的配置大概是这样的:有2个django写的网站,在同一台服务器上配置到不同的域名,
为了管理方便起见,我建立了2个linux帐号,把2个网站的代码分开保存,每个网站写了一个如下的配置
server.modules += (
"mod_rewrite",
"mod_fastcgi",
)
$HTTP["host"] == "bar.foo.com" {
server.document-root = "/home/bar/django-project/static"
fastcgi.server = (
"/bar.fcgi" => (
"main" => (
"socket" => "/home/bar/bar.sock",
"check-local" => "disable",
)
),
)
url.rewrite-once = (
"^(/.*)$" => "/bar.fcgi$1",
)
}
两个配置文件除了"bar"的地方不同,其他都一样。我把他们ln -s 到/etc/lighttpd/conf-available目录。
问题来了。
当我用lighty-enable-mod把两个网站的其中一个enable了,测试完全没有问题。
当我把2个网站同时enable,测试发现网站无法访问,出来如下的错误:
Page not found (404)
Request Method:
GET
Request URL:
http://bar.foo.com/bar.fcgi/
"/home/bar/django-project/static/dataon.fcgi" does not exist
You're seeing this error because you have DEBUG = True in your Django
settings file. Change that to False, and Django will display a standard 404
page.
也就是说,本来应该交给fascgi的请求,却去static目录搜索。
这个错误,只有当我同时其他2个网站的时候才会出现。不知道有没有人遇到过这个问题呢?
help me!
:(
-------------- 下一部分 --------------
一个HTML附件被移除...
URL: http://python.cn/pipermail/python-chinese/attachments/20070926/8445a0ed/attachment.html
2007年09月29日 星期六 20:16
On 9/26/07, John fractal <johnfractal at gmail.com> wrote: > > 有人遇到过这样的问题么…… > > 我的配置大概是这样的:有2个django写的网站,在同一台服务器上配置到不同的域名, > 为了管理方便起见,我建立了2个linux帐号,把2个网站的代码分开保存,每个网站写了一个如下的配置 > > server.modules += ( > "mod_rewrite", > "mod_fastcgi", > ) 有没有可能是这儿的问题?这儿可能写到主配置文件中比较好。 [snip] -------------- next part -------------- An HTML attachment was scrubbed... URL: http://python.cn/pipermail/python-chinese/attachments/20070929/e311ace0/attachment.htm
Zeuux © 2025
京ICP备05028076号