【问题标题】:Installing apache and mod_wsgi for django web application?为 django Web 应用程序安装 apache 和 mod_wsgi?
【发布时间】:2016-02-09 11:19:18
【问题描述】:

所以我一直在努力安装 apache 和 mod_wsgi,以便部署我的 Web 应用程序。我一直在尝试遵循本指南:

https://code.google.com/p/modwsgi/wiki/QuickInstallationGuide

但我仍然无法找到和安装 apache 和 mod_wsgi 软件包。似乎有很多地方可以在线安装这些东西,但我不知道该选择哪些。我能得到一些帮助吗?

我使用的是 Ubuntu,所以我需要 Apache 2.2 和 dev 包。

我的 python 设置应该没问题。在上面的链接中,当我到达配置部分时,我得到了错误...

checking Apache version... ./configure: line 2765: apxs: command not found
./configure: line 2765: apxs: command not found
./configure: line 2766: apxs: command not found
./configure: line 2769: /: Is a directory

checking for python... /home/joe/Documents/virtualenvs/exchange/bin/python
./configure: line 2964: apxs: command not found
configure: creating ./config.status
config.status: creating Makefile

看来我最初没有正确安装 apache,这就是我寻求帮助的原因。

谢谢!

【问题讨论】:

  • 检查这些链接以参考:django doc:docs.djangoproject.com/en/1.8/howto/deployment/wsgi/modwsgi 和这个链接也是digitalocean.com/community/tutorials/…
  • 是的,我一直在关注 django,但我一直停留在配置和安装上,哈哈。不过现在我会检查第二个。
  • 你为什么要从源代码编译这些?然后从 Ubuntu 包中获取:sudo apt-get install apache libapache2-mod-wsgi.
  • 我一直在寻找 Ubuntu 软件包,但由于某种原因找不到它们……不过,第二个链接很有帮助。

标签: django apache mod-wsgi


【解决方案1】:

首先,您需要找到 Apache 的安装位置apxs。一旦你知道了位置(在这种情况下,假设它是/usr/sbin/apxs):

./configure --enable-apache2=/usr/sbin/apxs

【讨论】:

  • 谢谢!您建议如何找到我的 apxs 文件夹?
  • (澄清:我在 Mac 上)
  • 假设你已经安装了 Apache,find / -name "apxs";您可能必须使用 sudo 以 root 身份运行它。
猜你喜欢
  • 1970-01-01
  • 2013-06-19
  • 1970-01-01
  • 2021-03-14
  • 2014-02-27
  • 2012-05-13
  • 1970-01-01
  • 1970-01-01
  • 2012-11-01
相关资源
最近更新 更多