简体   繁体   English

在apache中有多个站点的Django

[英]Django with multiple sites in apache

I have the following configuration in Apache web server for one site in a virtual environment and I am not using virtualhost... 我在Apache Web服务器中为虚拟环境中的一个站点执行以下配置,但我没有使用virtualhost ...

WSGIPythonHome /var/www/mapsite
WSGIPythonPath /var/www/mapsite/lib/python3.4/site-packages

WSGIScriptAlias /mapflat /var/www/mapsite/mapsite/wsgi.py
WSGIApplicationGroup %{GLOBAL}    
<Location "/mapflat">
Options +Indexes +FollowSymLinks +ExecCGI
Order deny,allow
Allow from all
Allow from all
AddHandler wsgi-script .py

</Location>

My question: if I were to have another site in another virtual environment in future, do I append it to WSPythonHome with : or repeat the whole thing? 我的问题:如果将来我要在另一个虚拟环境中拥有另一个站点,是否可以使用:将它附加到WSPythonHome或重复整个过程?

Hopefully,This link should be helpful for you. 希望该链接对您有所帮助。

Deploying multiple django apps on Apache with mod_wsgi 使用mod_wsgi在Apache上部署多个Django应用

If it still doesn't help.Please comment. 如果仍然无法解决问题,请发表评论。 :-) :-)


At your query regarding the executing mod_wsgi as a daemon mode-: 在有关将mod_wsgi作为守护程序模式执行的查询中:

It is for the sake of performance. 这是为了性能。 Check here 在这里检查

Kindly revert for more queries :-) 请回复更多查询:-)


At your query for windows. 在查询Windows。

Thanks for asking 感谢您的询问

Daemons- They are the processes which run in the background and are not interactive. 守护程序-它们是在后台运行并且不是交互式的进程。 They have no controlling terminal. 他们没有控制终端。

They perform certain actions at predefined times or in response to certain events. 它们在预定义的时间或响应某些事件执行某些操作。 In *NIX, the names of daemons end in d. 在* NIX中,守护程序的名称以d结尾。

In context of windows ,Daemonss becomes services. 在Windows中,Daemonss成为服务。 So in context of windows,You need to install apache as a service.Detailed description is here . 因此在Windows环境中,您需要将apache作为服务安装。详细说明在这里

Process of implementation may be slightly different but actual intent is exactly same-The optimization. 实现过程可能略有不同,但实际意图完全相同-优化。

cheers :-) 欢呼声:-)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM