帮助在单个子域下设置多个 django 站点
在同一个子域下,我需要设置几个独立的站点,每个站点都运行django,这些站点是完全独立的。每个站点都应该位于其自己的子目录中,并且这些子目录必须受密码保护。
例如: <代码>
subdomain.example.com/site1
subdomain.example.com/site2
I am using apache2 and have a virtual server entry for the subdomain. django is run using FastCGI.基本上,我不知道如何设置。我应该在我的
Under the same subdomain, I need to set up several independent sites each running django, these sites are totally separate. Each site should be in its own subdirectory, and these subdirectories have to be password-protected.
for example:
subdomain.example.com/site1 subdomain.example.com/site2
I am using apache2 and have a virtual server entry for the subdomain. django is run using FastCGI.
basically, I do not know how to set this up. What do I put in to my <VirtualHost> entry for the subdomain? Usually, for a single django site under a subdomain I would put WSGIScriptAlias pointing to the python script that should be executed, but what do i do for multiple sites?
please help
thanks
konstantin
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这些不是单独的虚拟主机。
它们是虚拟主机内单独的“位置”(或“目录”)。
您将执行类似于以下操作的操作。
[这未经测试,因为我们为此使用 mod_wsgi。]
These aren't separate virtual hosts.
They are separate "locations" (or "directories") within a virtual host.
You'll do something a bit like the following.
[This is untested, since we use mod_wsgi for this.]
这是我的配置:
<代码>
here is my configuration: