- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我需要使用具有相同 url 的 DjangoCMS 和 prestashop,例如:
localhost/shop = prestashop<br>
localhost/everythingElse = DjangoCMS<br>
我的 prestashop 安装在 /var/www/prestashop
并且 djangoCMS 安装在 /var/www/djangoCMS
中.
Linux Mint 14 64 位、apache2、mod_python、wsgi...
我试过这个配置:
<VirtualHost *:80>
DocumentRoot "/var/www/djangoCMS"
ServerName localhost
WSGIScriptAlias / "/var/www/djangoCMS/djangoCMS/apache/django.wsgi"
<Directory "/var/www/djangoCMS/djangoCMS/apache">
Options +ExecCGI
Order allow,deny
Allow from all
</Directory>
<VirtualHost *:80>
DocumentRoot "/var/www/prestashop"
ServerName php.localhost
<Directory "/var/www/prestashop">
Options Indexes FollowSymLinks
AllowOverride None
Order Deny,Allow
Allow from all
</Directory>
Django 在本地主机上运行良好,但我无法访问 php.localhost:糟糕!谷歌浏览器找不到 php.localhost
最佳答案
ServerName php.localhost 表示您要告诉 Apache 回答对 http://php.localhost 发出的任何请求为此,您需要添加 php.localhost 以指向服务器 IP 地址(如果是您的本地开发环境,则为 127.0.0.1)
这在生产环境中不起作用。我的建议是使用 ProxyPass,您可以在其中告诉 Apache 将所有调用重定向到特定端口。例如:
<VirtualHost *:9090>
ServerName localhost
DocumentRoot /var/www/prestashop
<Directory "/var/www/prestashop">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/var/www/djangoCMS"
ServerName localhost
WSGIScriptAlias / "/var/www/djangoCMS/djangoCMS/apache/django.wsgi"
<Directory "/var/www/djangoCMS/djangoCMS/apache">
Options +ExecCGI
Order allow,deny
Allow from all
</Directory>
ProxyPass /shop http://localhost:9090
ProxyPassReverse /shop http://localhost:9090
</virtualHost>
这样你就可以让 prestashop 在 9090 端口运行,django 在 80 端口运行,并告诉 Apache 将所有调用从 http://localhost/shop 重定向到 http://localhost:9090
关于php - 如何结合 Prestashop (PHP) 和 DjangoCMS (Python),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16894743/
我正在尝试使用带有一些共享页面的 DjangoCMS 构建多个网站。是否可以创建一个在所有 Django Site 之间共享的页面? 使用基本的 DjangoCMS 配置,当页面在 Site 上发布时
我有一些PeoplePlugin,可以有许多子插件PersonPlugin。我想在 PeoplePlugin 模板中添加编辑模式按钮(添加子插件),这允许我打开模式来创建新的“PersonPlugin
我在 Windows 系统上并关注 Install Django CMS tutorial .根据它,我用 Python 3.4.3 设置了新的虚拟环境,用 pip 安装了 Djangocms-ins
DjangoCMS 工具栏未出现在 Firefox(和 Epiphany)中。不过它在 Chrome 中显示正常。 {% load cms_tags sekizai_tags %}
我正在尝试在 django-cms 中使用 django-contact-form。 django-contact-form 有一个或两个页面(显示表单和感谢信),由 django 模板表示 在这些模
我正在使用 djangoCMS,我已经创建了所有模板并且它们工作正常,现在我的问题是 djangoCMS 页面创建字段,我填写了几个字段,页面名称、slug、菜单标题和页面标题。如何在我的页面上添加和
我正在尝试让 djangocms-cascade 0.4.0 工作(0.3.2 似乎工作正常),但 django cms 编辑页面的下拉列表中没有选项。 我很确定我已经正确安装了它,至少大部分已经正确
正如我在标题“Django CMS 每次用户访问页面时都会打开数据库连接吗?”中提到的 问题是即使我看到了这个 page 它默认缓存我的页面,每次刷新/更改页面时都会打开一个新的 MySQL 连接。
创建新的 django-cms 项目时,安装程序不会询问任何设置问题。 runserver 启动正常,在 127.0.0.1:8000 生成了一个页面,但该页面是空白的,而不是演示页面。 除此之外
我还没有找到令人满意的方法:我有一个运行良好的 djangocms 设置。但我需要将 CMS 外部表格中的内容添加到我的主页,并在模板上呈现该内容。我可以这样做,但是在 CMS 中编辑 urls.py
因此,在 Django 1.7.7 中引入了一种处理信号的新方法。我正在使用 1.7.7 和 django_cms,在 Python 2 上运行。 我正在尝试实现这种新方法,尽管文档很少但足够简单明了
我用 djangoCMS 创建了一个网站,大量使用了 apphooks、cms 插件、向导等。我们有一个简单的应用程序,只有一个模型保存应该显示在主页上的核心数据。 models.py from dj
我已阅读文档,但似乎无法成功安装 djangocms 我正在使用虚拟环境,也试过没有它,然后是正常的安装过程。 Windows 10 操作系统和我可以很好地启动 Django 项目 我收到消息: 创建
如果用户填写表单,我编写了一个简单的 django 应用程序来存储电子邮件地址。一切正常,但是当我按照此操作时 tutorial为了将我的应用程序集成到 django-cms 中,我注意到我的表单没有
我是 Django 新手,我认为将 Aldryn 用于我的第一个真正的 Django 站点是个好主意! 我已经成功安装并实现了 Aldryn News & Blog。现在我想安装 Aldryn Sea
我有一个应用程序,它提供了一个表单来创建和更新“预测”。 url.py: urlpatterns = patterns('', url(r'^create/$', PredictionCreat
我正在开发一个 DjangoCMS 插件,它包含一个自己的 javascript 文件。该插件的 Javascript 依赖于与站点其余部分相同的库。所以,这是我现在所拥有的概念部分: Basetem
我们的 DjangoCMS 站点可以通过 http 和 https 访问。 通过 http 匿名使用是可以的。但我想禁用通过 http 登录。 有没有办法在用户想要登录时强制使用 https? 甚至登
我的 DjangoCMS 模板中有一些占位符(示例、页眉、内容和页脚)。我想使用默认项目自动填充任何新创建的页面:带有页眉插件的页眉占位符和带有页脚插件的页脚占位符。 如何实现? 最佳答案 这可以使用
我正在做 DjangoCMS 教程:http://django-cms.readthedocs.org/en/latest/introduction/plugins.html 到目前为止一切都很好,但
我是一名优秀的程序员,十分优秀!