我想用多个主机名运行多个 django 项目。
如果使用来自 www.momsy.org,则转到 /var/web/momsy.git.org 其他如果来自 www.momsy.net,则转到 /var/web/momsy.git.net
这是为了记录和分析他/她来自哪里。
因此,以下不起作用,因为 [WSGIPythonPath 不能出现在部分内]。
但我不能使用 http.conf 因为我需要“服务器名”变量。
我怎么解决这个问题?
ServerAdmin webmaster@localhost
服务器名 www.momsy.org
WSGIScriptAlias / /home/web/momsy.git.kr/momsy/wsgi.py
WSGIPythonPath /home/web/momsy.git.kr
<Directory /home/web/momsy.git.kr/momsy>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>
一种