大佬教程收集整理的这篇文章主要介绍了django apache :WSGIPythonHome 不能出现在 <VirtualHost> 部分,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一台运行 apache2 的带有 ubuntu-server 的服务器,我在那里有我的 django 项目。我在部署应用程序时遇到问题。这是我的 /etc/apache2/sites-available/000-default.conf:
<VirtualHost *:80>
# The Servername directive sets the request scheR_179_11845@e,hostname and port that
# the server uses to IDentify itself. This is used when creaTing
# redirection URLs. In the context of virtual hosts,the Servername
# specifIEs what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this filE) this
# value is not decisive as it is used as a last resort host regardless.
# However,you must set it for any further virtual host explicitly.
#Servername HIVE.localhost
Serveradmin webmaster@localhost
documentRoot /home/Leo/HIVE/src
# Available loglevels: trace8,...,trace1,deBUG,info,notice,warn,# error,crit,alert,emerg.
# it is also possible to configure the loglevel for particular
# modules,e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/,which are
# enabled or Disabled at a global level,it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally Disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
Alias /static /home/Leo/HIVE/src/static
<Directory /home/Leo/HIVE/src/static>
require all granted
</Directory>
Alias /media /home/Leo/media
<Directory /home/Leo/media>
require all granted
</Directory>
<Directory /home/Leo/HIVE/src/HIVE>
<files wsgi.py>
require all granted
</files>
</Directory>
WsgiPythonHome /home/Leo/HIVE/HIVE_env
WsgiPythonPath /home/Leo/HIVE/src
WsgiDaemonProcess HIVE python-home=/home/Leo/HIVE/HIVE_env python-path=/home/Leo/HIVE/src/HIVE
WsgiProcessGroup HIVE
WsgiScriptAlias / /home/Leo/HIVE/src/HIVE/wsgi.py
</VirtualHost>
我想使用 wsgi 来部署它。我已经尝试了在互联网上找到的几种解决方案,但我无法做到。遗憾的是,文档根本没有帮助,digital ocean tutorial on this 也没有。我坚持使用 sudo apache2ctl configtest 命令,它给了我标题中的错误。我已经更改了数据库及其所在文件夹的所有权。
附加信息: 在我的主目录中,我有两个名为 HIVE 和 @H_445_13@media 的文件夹。在 HIVE 内有一个名为 HIVE_env 的 virtualenv 文件夹和一个 src 文件夹。在 src 里面有我的项目,在 HIVE_env 里面有我的 env(包含 libs 和其余的)
我是 apache 和部署的新手,所以这对我来说是很多新信息。感谢您的关注。
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)
以上是大佬教程为你收集整理的django apache :WSGIPythonHome 不能出现在 <VirtualHost> 部分全部内容,希望文章能够帮你解决django apache :WSGIPythonHome 不能出现在 <VirtualHost> 部分所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。