apache下django配置

网络整理 - 07-26

 

在http.conf中加入
<Location "/mysite/">
    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE settings
    PythonOption django.root /mysite
    PythonDebug On
    PythonPath "['/srv/www/htdocs/mysite'] + sys.path"
</Location>