Python论坛  - 讨论区

标题:[python-chinese] django部署在apache上的一些疑

2007年11月30日 星期五 02:35

List shell.lists在gmail.com
星期五 十一月 30 02:35:36 HKT 2007

дÁ˸ö³ÌÐò,ÔÚdjangoÉÏ×Ô´øµÄ·þÎñÆ÷ÉÏ¿ª·¢Íê³É,ĿǰÏ벿Êðµ½apacheÉÏÈ¥
ÒѾ­×öÁË:
httpd.conf

LoadModule python_module /usr/lib/apache2/modules/mod_python.so
###### django
        
                SetHandler python-program
                PythonPath "['/var/www']+sys.path"
                PythonHandler django.core.handlers.modpython
                SetEnv DJANGO_SETTINGS_MODULE index.settings
                PythonInterpreter mysite
                PythonDebug On
        
        Alias /images /var/www/index/media
        
                SetHandler None
        
ÔÚapacheÉÏÒ²ÒѾ­Õý³£¹¤×÷.
ÎÒµÄÎÊÌâÊÇ:
1: ÊDz»ÊÇÏÖÔÚdjangoºÍmod_pythonÒѾ­¿ªÊ¼¹¤×÷ÁË, »¹Ðè²»ÐèÒªÐÞ¸ÄÒѾ­Ð´ºÃµÄpython³ÌÐò.
2: ÎҸоõmod_pythonºÃÏóû¹¤×÷,ÎÒÓÃab²âÊÔÁËÏÂ:
ab -n 100 -c 100 http://192.168.1.254/web
½á¹û
 ....
Concurrency Level:      100
Time taken for tests:   63.250950 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Non-2xx responses:      100
Total transferred:      27900 bytes
HTML transferred:       0 bytes
Requests per second:    1.58 [#/sec] (mean)
Time per request:       63250.950 [ms] (mean)
Time per request:       632.509 [ms] (mean, across all concurrent requests)
Transfer rate:          0.43 [Kbytes/sec] received


¸Ð¾õmod_pythonûÆðÔõô×÷ÓÃ, abÎÒ²»ÊǺܻῴ,  ÏëÎÊÏÂÎÒÕâ½á¹ûÊDz»ÊÇÕý³£µÄ.  ÎÒ192.168.1.254ÄÇ̨·þÎñÆ÷ÅäÖò»¸ß(OS:debian .C 1.3µÄCPU, 256ÄÚ´æ)
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071130/7d401987/attachment.html 

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

2007年11月30日 星期五 16:00

阿杰 gujiajie在gmail.com
星期五 十一月 30 16:00:19 HKT 2007

Çë½Ìһϣ¬ÄãÖ»ÉèÖÃhttpd.conf¾ÍÐÐÁËÂð£¿
sites-availableϵÄÕ¾µãÎļþÊÇ·ñÒª±à¼­£¿

ÔÚ07-11-30£¬List <shell.lists在gmail.com> дµÀ£º
>
>  дÁ˸ö³ÌÐò,ÔÚdjangoÉÏ×Ô´øµÄ·þÎñÆ÷ÉÏ¿ª·¢Íê³É,ĿǰÏ벿Êðµ½apacheÉÏÈ¥
> ÒѾ­×öÁË:
> httpd.conf
>
> LoadModule python_module /usr/lib/apache2/modules/mod_python.so
> ###### django
>         
>                 SetHandler python-program
>                 PythonPath "['/var/www']+sys.path"
>                 PythonHandler django.core.handlers.modpython
>                 SetEnv DJANGO_SETTINGS_MODULE index.settings
>                 PythonInterpreter mysite
>                 PythonDebug On
>         
>         Alias /images /var/www/index/media
>         
>                 SetHandler None
>         
> ÔÚapacheÉÏÒ²ÒѾ­Õý³£¹¤×÷.
> ÎÒµÄÎÊÌâÊÇ:
> 1: ÊDz»ÊÇÏÖÔÚdjangoºÍmod_pythonÒѾ­¿ªÊ¼¹¤×÷ÁË, »¹Ðè²»ÐèÒªÐÞ¸ÄÒѾ­Ð´ºÃµÄpython³ÌÐò.
> 2: ÎҸоõmod_pythonºÃÏóû¹¤×÷,ÎÒÓÃab²âÊÔÁËÏÂ:
> ab -n 100 -c 100 http://192.168.1.254/web
> ½á¹û
>  ....
> Concurrency Level:      100
> Time taken for tests:   63.250950 seconds
> Complete requests:      100
> Failed requests:        0
> Write errors:           0
> Non-2xx responses:      100
> Total transferred:      27900 bytes
> HTML transferred:       0 bytes
> Requests per second:    1.58 [#/sec] (mean)
> Time per request:       63250.950 [ms] (mean)
> Time per request:       632.509 [ms] (mean, across all concurrent
> requests)
> Transfer rate:          0.43 [Kbytes/sec] received
>
>
> ¸Ð¾õmod_pythonûÆðÔõô×÷ÓÃ, abÎÒ²»ÊǺܻῴ,  ÏëÎÊÏÂÎÒÕâ½á¹ûÊDz»ÊÇÕý³£µÄ.  ÎÒ192.168.1.254ÄÇ̨·þÎñÆ÷ÅäÖò»¸ß(OS:debian
> .C 1.3µÄCPU, 256ÄÚ´æ)
>
> _______________________________________________
> 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/20071130/cc5251d4/attachment-0001.htm 

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

2007年11月30日 星期五 19:03

eho eho jiulang.eho在gmail.com
星期五 十一月 30 19:03:11 HKT 2007

 àÅ~~ÅäÖÃhttp.conf¾Í¿ÉÒÔÁË£¬
¶ÔÁË£¬¿´http.confÖÐÌí¼Ó
LoadModule python_module modules/mod_python.so
ÁËû


ÔÚ07-11-30£¬°¢½Ü <gujiajie在gmail.com> дµÀ£º
>
> Çë½Ìһϣ¬ÄãÖ»ÉèÖÃhttpd.conf¾ÍÐÐÁËÂð£¿
> sites-availableϵÄÕ¾µãÎļþÊÇ·ñÒª±à¼­£¿
>
> ÔÚ07-11-30£¬List <shell.lists在gmail.com> дµÀ£º
> >
> >  дÁ˸ö³ÌÐò,ÔÚdjangoÉÏ×Ô´øµÄ·þÎñÆ÷ÉÏ¿ª·¢Íê³É,ĿǰÏ벿Êðµ½apacheÉÏÈ¥
> > ÒѾ­×öÁË:
> > httpd.conf
> >
> > LoadModule python_module /usr/lib/apache2/modules/mod_python.so
> > ###### django
> >         
> >                 SetHandler python-program
> >                 PythonPath "['/var/www']+sys.path"
> >                 PythonHandler django.core.handlers.modpython
> >                 SetEnv DJANGO_SETTINGS_MODULE index.settings
> >                 PythonInterpreter mysite
> >                 PythonDebug On
> >         
> >         Alias /images /var/www/index/media
> >         
> >                 SetHandler None
> >         
> > ÔÚapacheÉÏÒ²ÒѾ­Õý³£¹¤×÷.
> > ÎÒµÄÎÊÌâÊÇ:
> > 1: ÊDz»ÊÇÏÖÔÚdjangoºÍmod_pythonÒѾ­¿ªÊ¼¹¤×÷ÁË, »¹Ðè²»ÐèÒªÐÞ¸ÄÒѾ­Ð´ºÃµÄpython³ÌÐò.
> > 2: ÎҸоõmod_pythonºÃÏóû¹¤×÷,ÎÒÓÃab²âÊÔÁËÏÂ:
> > ab -n 100 -c 100 http://192.168.1.254/web
> > ½á¹û
> >  ....
> > Concurrency Level:      100
> > Time taken for tests:   63.250950 seconds
> > Complete requests:      100
> > Failed requests:        0
> > Write errors:           0
> > Non-2xx responses:      100
> > Total transferred:      27900 bytes
> > HTML transferred:       0 bytes
> > Requests per second:    1.58 [#/sec] (mean)
> > Time per request:       63250.950 [ms] (mean)
> > Time per request:       632.509 [ms] (mean, across all concurrent
> > requests)
> > Transfer rate:          0.43 [Kbytes/sec] received
> >
> >
> > ¸Ð¾õmod_pythonûÆðÔõô×÷ÓÃ, abÎÒ²»ÊǺܻῴ,  ÏëÎÊÏÂÎÒÕâ½á¹ûÊDz»ÊÇÕý³£µÄ.  ÎÒ192.168.1.254ÄÇ̨·þÎñÆ÷ÅäÖò»¸ß(OS:debian
> > .C 1.3µÄCPU, 256ÄÚ´æ)
> >
> > _______________________________________________
> > 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/20071130/867850a5/attachment-0001.html 

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

2007年11月30日 星期五 21:41

List shell.lists在gmail.com
星期五 十一月 30 21:41:22 HKT 2007

2.0µÄ /etc/apach2/httpd.confÊÇ¿ÕÎļþ,
ʵ¼ÊÉÏÐ޸ĵϹÊÇ sites-availableÏÂÃæµÄdefault .
ÔÚdefaultÉϼÓÉÏdjango²¿·Ö .



   
  ÔÚ07-11-30£¬°¢½Ü <gujiajie在gmail.com> дµÀ£º 
    Çë½Ìһϣ¬ÄãÖ»ÉèÖÃhttpd.conf¾ÍÐÐÁËÂð£¿
    sites-availableϵÄÕ¾µãÎļþÊÇ·ñÒª±à¼­£¿


    ÔÚ07-11-30£¬List <shell.lists在gmail.com> дµÀ£º 
      дÁ˸ö³ÌÐò,ÔÚdjangoÉÏ×Ô´øµÄ·þÎñÆ÷ÉÏ¿ª·¢Íê³É,ĿǰÏ벿Êðµ½apacheÉÏÈ¥
      ÒѾ­×öÁË:
      httpd.conf

      LoadModule python_module /usr/lib/apache2/modules/mod_python.so
      ###### django
              
                      SetHandler python-program
                      PythonPath "['/var/www']+sys.path"
                      PythonHandler django.core.handlers.modpython
                      SetEnv DJANGO_SETTINGS_MODULE index.settings
                      PythonInterpreter mysite
                      PythonDebug On
              
              Alias /images /var/www/index/media
              
                      SetHandler None
              
      ÔÚapacheÉÏÒ²ÒѾ­Õý³£¹¤×÷. 
      ÎÒµÄÎÊÌâÊÇ:
      1: ÊDz»ÊÇÏÖÔÚdjangoºÍmod_pythonÒѾ­¿ªÊ¼¹¤×÷ÁË, »¹Ðè²»ÐèÒªÐÞ¸ÄÒѾ­Ð´ºÃµÄpython³ÌÐò.
      2: ÎҸоõmod_pythonºÃÏóû¹¤×÷,ÎÒÓÃab²âÊÔÁËÏÂ:
      ab -n 100 -c 100 http://192.168.1.254/web
      ½á¹û
       ....
      Concurrency Level:      100
      Time taken for tests:   63.250950 seconds
      Complete requests:      100
      Failed requests:        0
      Write errors:           0
      Non-2xx responses:      100
      Total transferred:      27900 bytes 
      HTML transferred:       0 bytes
      Requests per second:    1.58 [#/sec] (mean)
      Time per request:       63250.950 [ms] (mean)
      Time per request:       632.509 [ms] (mean, across all concurrent requests)
      Transfer rate:          0.43 [Kbytes/sec] received


      ¸Ð¾õmod_pythonûÆðÔõô×÷ÓÃ, abÎÒ²»ÊǺܻῴ,  ÏëÎÊÏÂÎÒÕâ½á¹ûÊDz»ÊÇÕý³£µÄ.  ÎÒ192.168.1.254ÄÇ̨·þÎñÆ÷ÅäÖò»¸ß(OS:debian .C 1.3µÄCPU, 256ÄÚ´æ)

      _______________________________________________
      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





------------------------------------------------------------------------------


  _______________________________________________
  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/20071130/641d842f/attachment.htm 

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

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

    你的回复:

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

    Zeuux © 2025

    京ICP备05028076号