如何来提供通过Django和PHP在同一个域中的动态内容? [英] How to serve up dynamic content via django and php on same domain?

查看:134
本文介绍了如何来提供通过Django和PHP在同一个域中的动态内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚完成重写使用Python的Django的我的网站的一部分显著,但我也有在我还没有完成迁移还没有结束PHP的一些遗留code。是否有可能获得这两个在同一领域工作的,如果是这样,我怎么去这样做?

I just finished rewriting a significant portion of my web site using python's django, but I also have some legacy code in php that I haven't finished migrating over yet. Is it possible to get these two working on the same domain and if so, how do I go about doing it?

我运行一个虚拟Ubuntu的实例,本网站和通过Apache服务内容。我还使用mod_wsgi的挂钩到Python的内容。

I'm running this site on a virtual Ubuntu instance and serving content up via apache. I'm also using mod_wsgi to hook into the python content.

一个简化是整个网站,除了一个子目录,逃跑蟒蛇。比方说,为了讨论我的PHP code是在 http://www.mysite.com/myphpapp/

One simplification is that the whole site, except for one sub-directory, runs off python. Let's say for arguments sake that my php code is at http://www.mysite.com/myphpapp/.

推荐答案

基本上,你必须配置Apache来使用默认的处理程序路径托管遗留code,通常添加<目录> <地点> 部分到Apache的站点配置

Basically you have to configure apache to use the default handler for the path hosting your legacy code, usually adding a <directory> or <location> section to your apache site config.

是这样的:

<Location "/legacy">
    SetHandler None
</Location>

这篇关于如何来提供通过Django和PHP在同一个域中的动态内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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