配置mod_wsgi为django 1.4 apache无法启动在mac osx后添加WSGIPythonPath到虚拟主机配置 [英] when configuring mod_wsgi for django 1.4 apache fails to start on mac osx after adding WSGIPythonPath to the virtual host config

查看:773
本文介绍了配置mod_wsgi为django 1.4 apache无法启动在mac osx后添加WSGIPythonPath到虚拟主机配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遵循django文档关于如何使用mod_wsgi将django 1.4部署到apache https:/ /docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/ 在mac osx狮子,当我添加WSGIPythonPath指令apache不能重新启动。没有它我的应用程序是不存在的路径。在日志中,我收到一条错误,读取

I followed the django docs on how to deploy django 1.4 to apache using mod_wsgi https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/ on mac osx lion and when I add the WSGIPythonPath directive apache cant restart .Yet without it my app is non existant in the path . In the log I am getting an error that reads


在VirtualHost部分中不能出现WSGIPythonPath

WSGIPythonPath cannot occur within VirtualHost section

这是我的虚拟主机配置看起来像

here is what my virtual host config looks like

<VirtualHost *:80>
ServerAdmin jmured@gmail.com
DocumentRoot "/Users/jamo/code/work/projects/bfpd/fapp"
ServerName bfpd.dev
ServerAlias bfpd.dev
ErrorLog "/private/var/log/apache2/bfpd.dev-error_log"
CustomLog "/private/var/log/apache2/bfpd.dev-access_log" common
Alias /static/ /Users/jamo/code/work/projects/bfpd/fapp/fapp/static/
<Directory /Users/jamo/code/work/projects/bfpd/fapp/fapp/static>
  Options Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
IndexOptions FancyIndexing
</Directory>
WSGIScriptAlias / /Users/jamo/code/work/projects/bfpd/fapp/fapp/wsgi.py
WSGIPythonPath /Users/jamo/code/work/projects/bfpd/fapp/  
    <Directory /Users/jamo/code/work/projects/bfpd/fapp/fapp>
    Options Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>

   </VirtualHost>

我做错了什么???

推荐答案

我修正了
WSGIPythonPath / Users / jamo / code / work / projects / bfpd / fapp /
应在 http.conf

这篇关于配置mod_wsgi为django 1.4 apache无法启动在mac osx后添加WSGIPythonPath到虚拟主机配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆