zoukankan      html  css  js  c++  java
  • apache2:Invalid option to WSGI daemon process definition

    版本说明: ubuntu 12.04 server /apache 2.2 / mod_wsgi 3.3 / python 2.7.3 /django 1.7

    在ubuntu12的服务器上配置django网站(有多个网站,采用了VirtualHost配置了多个站点)。

    这个问题折腾了半天。莫名其妙。

    在之前已经成功配置过 ,使用以下命令曾经ok,现在报错。

    WSGIDaemonProcess process_name python-path=/path/to/your/site:/path/to/django/site-packages
    

    然后突然有一天 python-path选项用不了了!搞不懂为什么,貌似什么都没有更新!

    几番查找下来,发现以下内容比较有意义,其他的似乎都在说mod_wsgi的版本太久了(用 dpkg -l | grep mod-wsgi一看是3.3的,完全不旧!)。

    http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide#Delegation_To_Daemon_Process

    http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango

    http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html

    最后曲线救国,通过改写wsgi.py文件将上面path-path的值加入到sys.path中并去掉此选项,完美解决。

    import sys
    sys.path.append('path/to/your/site')
    sys.path.append('path/to/diango/site-packages')
    

      

  • 相关阅读:
    动态库的创建与使用
    静态库创建与链接
    tail命令使用
    hosts文件
    dns文件
    整数编码
    多线程之间同步
    多线程编程基础
    进程间通信——信号量
    进程间通信——管道
  • 原文地址:https://www.cnblogs.com/Tommy-Yu/p/4026345.html
Copyright © 2011-2022 走看看