大佬教程收集整理的这篇文章主要介绍了与WSGIDaemonProcess的django apacheconfiguration不工作,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
更新了问题
[Mon Jul 18 09:20:10.517873 2016] [:error] [pid 30316:tid 139756302964480] [remote 122.164.94.99:48261] TraceBACk (most recent call last): [Mon Jul 18 09:20:10.518005 2016] [:error] [pid 30316:tid 139756302964480] [remote 122.164.94.99:48261] File "/var/www/rent/Rent/wsgi.py",line 20,in <module> [Mon Jul 18 09:20:10.518141 2016] [:error] [pid 30316:tid 139756302964480] [remote 122.164.94.99:48261] from django.core.wsgi import get_wsgi_application [Mon Jul 18 09:20:10.518236 2016] [:error] [pid 30316:tid 139756302964480] [remote 122.164.94.99:48261] ImportError: No module named django.core.wsgi
我的虚拟主机
<VirtualHost *:80> ServerName ip_address ServerAdmin webmaster@localhost Alias /static/ /var/www/rent/static/ Alias /media/ /var/www/rent/media/ WSGIScriptAlias / /var/www/rent/Rent/wsgi.py WSGIDaemonProcess Rent python-path=/var/www/rent:/root/.virtualenvs/rent/lib/python2.7/site-packages WSGIProcessGroup Rent <Directory /var/www/rent/static> Options -Indexes Order deny,allow Allow from all </Directory> <Directory /var/www/rent/media> Options -Indexes Order deny,allow Allow from all </Directory> LogLevel warn ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
如何获取适用于RHL的Apache mod_jk连接器?
django setTings.py中的“os.environ”无法通过apache和wsgi获取系统环境variables
间歇性“试图分配非对象的属性”对请求/无法通过$ this设置对象的属性
如何从其他计算机访问我的本地主机服务器?
Apache SSLMutex问题
如何从FTP下载文件而不下载它们?
Zookeeper工作
WSGIDaemonProcess Rent python-path=/var/www/rent:/root/.virtualenvs/rent/lib/python2.7/site-packages
这是问题最可能的原因。 您已经在超级用户的主文件夹内创建了@L_489_15@virtualenv。 但是该文件夹不太可能被apache访问。 默认情况下,用户的主文件夹不能被任何其他用户访问。
Web服务器和WSGI进程将作为非特权用户(通常名为nobody , httpd , apache或类似名称)运行。 虽然你可以通过改变/ root /这个权限来解决这个问题,这是@L_489_15@很大的问题。 如果它是@L_489_15@普通用户,那么这样做危险性会小一些,但这样做还不是@L_489_15@好主意。
最好的解决方案是将virtualenv放在非特权用户可以访问的位置。 /usr/local/virtualenv是@L_489_15@很好的位置。
请注意,移动/root/.virtualenvs/到/usr/local/virtualenv你将不得不重新创建它如下
source /root/.virtualenvs/rent/bin/activate pip freeze > /tmp/requirements.txt cd /usr/local/ virtualenv virtualenv source virtualenv/bin/activate pip install -r /tmp/requirements.txt
以上是大佬教程为你收集整理的与WSGIDaemonProcess的django apacheconfiguration不工作全部内容,希望文章能够帮你解决与WSGIDaemonProcess的django apacheconfiguration不工作所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。