免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2175 | 回复: 0
打印 上一主题 下一主题

django部署在apache上的一些疑问 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-11-30 02:30 |只看该作者 |倒序浏览
写了个程序,在django上自带的服务器上开发完成,目前想部署到apache上去
已经做了:
httpd.conf

  1. LoadModule python_module /usr/lib/apache2/modules/mod_python.so
  2. ###### django
  3.         <Location "/">
  4.                 SetHandler python-program
  5.                 PythonPath "['/var/www']+sys.path"
  6.                 PythonHandler django.core.handlers.modpython
  7.                 SetEnv DJANGO_SETTINGS_MODULE index.settings
  8.                 PythonInterpreter mysite
  9.                 PythonDebug On
  10.         </Location>
  11.         Alias /images /var/www/index/media
  12.         <Location "/images">
  13.                 SetHandler None
  14.         </Location>
复制代码


在apache上也已经正常工作.

我的问题是:
1: 是不是现在django和mod_python已经开始工作了, 还需不需要修改已经写好的python程序.
2: 我感觉mod_python好象没工作,我用ab测试了下:
ab -n 100 -c 100 http://192.168.1.254/web
结果
  1. ....
  2. Concurrency Level:      100
  3. Time taken for tests:   63.250950 seconds
  4. Complete requests:      100
  5. Failed requests:        0
  6. Write errors:           0
  7. Non-2xx responses:      100
  8. Total transferred:      27900 bytes
  9. HTML transferred:       0 bytes
  10. Requests per second:    1.58 [#/sec] (mean)
  11. Time per request:       63250.950 [ms] (mean)
  12. Time per request:       632.509 [ms] (mean, across all concurrent requests)
  13. Transfer rate:          0.43 [Kbytes/sec] received

  14. onnection Times (ms)
  15.               min  mean[+/-sd] median   max
  16. Connect:        0    4   7.8      0      30
  17. Processing:  1582 36427 18260.3  37694   62660
  18. Waiting:     1572 36422 18260.1  37694   62660
  19. Total:       1582 36431 18259.7  37694   62680

  20. Percentage of the requests served within a certain time (ms)
  21.   50%  37694
  22.   66%  46847
  23.   75%  53176
  24.   80%  56090
  25.   90%  60286
  26.   95%  61738
  27.   98%  62590
  28.   99%  62680
  29. 100%  62680 (longest request)
复制代码


感觉mod_python没起怎么作用, ab我不是很会看,  想问下我这结果是不是正常的.  我192.168.1.254那台服务器配置不高(OS:debian .C 1.3的CPU, 256内存)
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP