English 中文(简体)
在 mod_python下开展多个Django项目,而不使用虚拟Hosts
原标题:Running multiple Django projects under mod_python, without using VirtualHosts

我在同一个机器上有两个连环项目。 它们采用标准的django/apache/mod_python配置设立,基本如下:

<Location "/mysite">
    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE mysite.settings
    PythonOption django.root /mysite
    PythonDebug On
    PythonPath "[ /path/to/project/parent ] + sys.path"
</Location>

两个项目的现场各不相同(地点指令、DJANGO_SETMENTS_MODULE和django.root)。 甲型六氯环己烷也各不相同。

两个地点指令中只有一个,每个地点都要罚款。 两个组合单独运作。

当我有两项定位指令时(指独一无二的尿道),我只能去一个地点。 我有“/portal”和“/apitest”的定位指令,我去。 我总是从“/港口”获得服务。

仅仅通过包含多个地点指令,还是有必要使用虚拟Hosts来为同一东道方的两处django站点提供服务?

Thanks, David

最佳回答
问题回答

暂无回答




相关问题
How to get two random records with Django

How do I get two distinct random records using Django? I ve seen questions about how to get one but I need to get two random records and they must differ.

Moving (very old) Zope/Plone Site to Django

I am ask to move data from a (now offline) site driven by Plone to a new Django site. These are the version informations I have: Zope Version (unreleased version, python 2.1.3 ) Python Version 2.1....

Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

Flexible pagination in Django

I d like to implement pagination such that I can allow the user to choose the number of records per page such as 10, 25, 50 etc. How should I go about this? Is there an app I can add onto my project ...

is it convenient to urlencode all next parameters? - django

While writing code, it is pretty common to request a page with an appended "next" query string argument. For instance, in the following template code next points back to the page the user is on: &...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

热门标签