Python论坛  - 讨论区

标题:[python-chinese] django 使用lighttpd+fastcgi运行时,admin的样式加载不了?

2007年05月14日 星期一 14:57

xiaoyi tian purpen.w在gmail.com
星期一 五月 14 14:57:00 HKT 2007

ÎÊÌâÈçÖ÷Ìâ:

ÎÒµÄlighttpdÉèÖãº

$HTTP["host"] == "demo.ad.com.cn" {
    server.document-root = "/home/usrname/project/trunk/ad"
        server.errorlog =
"/home/usrname/project/trunk/ad/lighttpd-server/var/lighttpd-error.log"
        accesslog.filename =
"/home/usrname/project/trunk/ad/lighttpd-server/var/lighttpd-access.log"
    fastcgi.server = (
        "/main.fcgi" => (
          "main" => (
              "socket" => "/home/usrname/project/trunk/ad/ad.socket",
            "check-local" => "disable",
            )
        ),
    )
        alias.url = (
          "/media" => "/home/usrname/project/trunk/ad/media",
        )
    url.rewrite-once = (
        "^(/.*)$" => "/main.fcgi$1",
                "(/media.*)$" => "$1",
    )
}

/home/usrname/project/trunk/ad/mediaÎÒÊÇ´Ó/usr/lib/python2.4/site-packages/django/contrib/admin/media×öµÄÒ»¸ö·ûºÏÁ´½Ó¡£
-- 
ÈËÉú¾ÍÏñÒ»¸öÆ¿×Ó£¬¶øÉú»î¾ÍÊÇÆ¿×ÓÀïµÄË®¡£
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070514/cd60405b/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年05月14日 星期一 16:07

Bruce Wang number5在gmail.com
星期一 五月 14 16:07:03 HKT 2007

On 5/14/07, xiaoyi tian <purpen.w在gmail.com> wrote:
>
>         alias.url = (
>           "/media" => "/home/usrname/project/trunk/ad/media",
>         )
>     url.rewrite-once = (
>         "^(/.*)$" => "/main.fcgi$1",
>                 "(/media.*)$" => "$1",
>     )
> }
>
>
估计是url rewrite的问题,不清楚django的url是怎么分配的,直接访问admin的样式文件,看看是什么结果

-- 
simple is good
http://brucewang.net
skype: number5
-------------- 下一部分 --------------
一个HTML附件被移除...
URL: http://python.cn/pipermail/python-chinese/attachments/20070514/8a1ac679/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年05月14日 星期一 16:17

xiaoyi tian purpen.w在gmail.com
星期一 五月 14 16:17:26 HKT 2007

ÎÞ·¨ÏÔʾ

ÔÚ07-5-14£¬Bruce Wang <number5在gmail.com> дµÀ£º
>
>
>
> On 5/14/07, xiaoyi tian <purpen.w在gmail.com> wrote:
> >
> >         alias.url = (
> >           "/media" => "/home/usrname/project/trunk/ad/media",
> >         )
> >     url.rewrite-once = (
> >         "^(/.*)$" => "/main.fcgi$1",
> >                 "(/media.*)$" => "$1",
> >     )
> > }
> >
> >
> ¹À¼ÆÊÇurl rewriteµÄÎÊÌ⣬²»Çå³þdjangoµÄurlÊÇÔõô·ÖÅäµÄ£¬Ö±½Ó·ÃÎÊadminµÄÑùʽÎļþ£¬¿´¿´ÊÇʲô½á¹û
>
> --
> simple is good
> http://brucewang.net
> skype: number5
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>



-- 
ÈËÉú¾ÍÏñÒ»¸öÆ¿×Ó£¬¶øÉú»î¾ÍÊÇÆ¿×ÓÀïµÄË®¡£
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070514/9fb270a5/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年05月14日 星期一 16:21

xiaoyi tian purpen.w在gmail.com
星期一 五月 14 16:21:29 HKT 2007

·ÃÎÊËühttp://demo.ad.com.cn:8001/media/css/dashboard.css,³öÏÖ404´íÎó

ÔÚ07-5-14£¬Bruce Wang <number5在gmail.com> дµÀ£º
>
>
>
> On 5/14/07, xiaoyi tian <purpen.w在gmail.com> wrote:
> >
> >         alias.url = (
> >           "/media" => "/home/usrname/project/trunk/ad/media",
> >         )
> >     url.rewrite-once = (
> >         "^(/.*)$" => "/main.fcgi$1",
> >                 "(/media.*)$" => "$1",
> >     )
> > }
> >
> >
> ¹À¼ÆÊÇurl rewriteµÄÎÊÌ⣬²»Çå³þdjangoµÄurlÊÇÔõô·ÖÅäµÄ£¬Ö±½Ó·ÃÎÊadminµÄÑùʽÎļþ£¬¿´¿´ÊÇʲô½á¹û
>
> --
> simple is good
> http://brucewang.net
> skype: number5
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>



-- 
ÈËÉú¾ÍÏñÒ»¸öÆ¿×Ó£¬¶øÉú»î¾ÍÊÇÆ¿×ÓÀïµÄË®¡£
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070514/035c2b7f/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年05月14日 星期一 16:56

Bruce Wang number5在gmail.com
星期一 五月 14 16:56:27 HKT 2007

On 5/14/07, xiaoyi tian <purpen.w在gmail.com> wrote:
>
>
> 访问它http://demo.ad.com.cn:8001/media/css/dashboard.css,出现404错误
>
> 在07-5-14,Bruce Wang < number5在gmail.com> 写道:
> >
> >
> >
> > On 5/14/07, xiaoyi tian <purpen.w在gmail.com> wrote:
> > >
> > >         alias.url = (
> > >           "/media" => "/home/usrname/project/trunk/ad/media",
> > >         )
> > >     url.rewrite-once = (
> > >         "^(/.*)$" => "/main.fcgi$1",
> > >                 "(/media.*)$" => "$1",
> > >     )
> > > }
> > >
> > >
> > 估计是url rewrite的问题,不清楚django的url是怎么分配的,直接访问admin的样式文件,看看是什么结果
> >
> >
>
>
/home/usrname/project/trunk/ad/media/css/dashboard.css 这个文件存在么?

或者去掉下面这几行看看
>
> alias.url = (
>           "/media" => "/home/usrname/project/trunk/ad/media",
>         )
>




-- 
simple is good
http://brucewang.net
skype: number5
-------------- 下一部分 --------------
一个HTML附件被移除...
URL: http://python.cn/pipermail/python-chinese/attachments/20070514/62cd66d1/attachment-0001.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年05月14日 星期一 17:04

xiaoyi tian purpen.w在gmail.com
星期一 五月 14 17:04:35 HKT 2007

Õâ¸öÎļþ´æÔÚ¡£



ÔÚ07-5-14£¬Bruce Wang <number5在gmail.com> дµÀ£º
>
>
>
> /home/usrname/project/trunk/ad/media/css/dashboard.css Õâ¸öÎļþ´æÔÚô£¿
>
> »òÕßÈ¥µôÏÂÃæÕ⼸Ðп´¿´
> >
> > alias.url = (
> >           "/media" => "/home/usrname/project/trunk/ad/media",
> >
> >
>


-- 
ÈËÉú¾ÍÏñÒ»¸öÆ¿×Ó£¬¶øÉú»î¾ÍÊÇÆ¿×ÓÀïµÄË®¡£
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070514/03233d22/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年05月15日 星期二 11:30

magic lu lujianxy在gmail.com
星期二 五月 15 11:30:48 HKT 2007

404错误由谁提示出来的?

应该是由lighthttp提示出来才对。

如果是dj提示出来的话,那说明你的设置还是有问题。

On 5/14/07, xiaoyi tian <purpen.w at gmail.com> wrote:
>
> 这个文件存在。
>
>
>
> 在07-5-14,Bruce Wang <number5 at gmail.com> 写道:
> >
> >
> >
> > /home/usrname/project/trunk/ad/media/css/dashboard.css 这个文件存在么?
> >
> > 或者去掉下面这几行看看
> > >
> > > alias.url = (
> > >           "/media" => "/home/usrname/project/trunk/ad/media",
> > >
> > >
> >
>
>
> --
> 人生就像一个瓶子,而生活就是瓶子里的水。
> _______________________________________________
> python-chinese
> Post: send python-chinese at lists.python.cn
> Subscribe: send subscribe to python-chinese-request at lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request at lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://python.cn/pipermail/python-chinese/attachments/20070515/f2ce9999/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年05月15日 星期二 13:25

xiaoyi tian purpen.w在gmail.com
星期二 五月 15 13:25:43 HKT 2007

àÞ£¬¶àл£¬½â¾öÁË£¬ÊÇmediaµÄ·¾¶²»¶Ô¡£

ÔÚ07-5-15£¬magic lu <lujianxy在gmail.com> дµÀ£º
>
> 404´íÎóÓÉË­Ìáʾ³öÀ´µÄ£¿
>
> Ó¦¸ÃÊÇÓÉlighthttpÌáʾ³öÀ´²Å¶Ô¡£
>
> Èç¹ûÊÇdjÌáʾ³öÀ´µÄ»°£¬ÄÇ˵Ã÷ÄãµÄÉèÖû¹ÊÇÓÐÎÊÌâ¡£
>
> On 5/14/07, xiaoyi tian <purpen.w在gmail.com > wrote:
> >
> > Õâ¸öÎļþ´æÔÚ¡£
> >
> >
> >
> > ÔÚ07-5-14£¬Bruce Wang <number5在gmail.com> дµÀ£º
> > >
> > >
> > >
> > > /home/usrname/project/trunk/ad/media/css/dashboard.css Õâ¸öÎļþ´æÔÚô£¿
> > >
> > > »òÕßÈ¥µôÏÂÃæÕ⼸Ðп´¿´
> > > >
> > > > alias.url = (
> > > >           "/media" => "/home/usrname/project/trunk/ad/media",
> > > >
> > > >
> > >
> >
> >
> > --
> > ÈËÉú¾ÍÏñÒ»¸öÆ¿×Ó£¬¶øÉú»î¾ÍÊÇÆ¿×ÓÀïµÄË®¡£
> > _______________________________________________
> > python-chinese
> > Post: send python-chinese在lists.python.cn
> > Subscribe: send subscribe to python-chinese-request在lists.python.cn
> > Unsubscribe: send unsubscribe to
> > python-chinese-request在lists.python.cn
> > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> >
>
>
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>



-- 
ÈËÉú¾ÍÏñÒ»¸öÆ¿×Ó£¬¶øÉú»î¾ÍÊÇÆ¿×ÓÀïµÄË®¡£
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070515/f7187c39/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号