0

我有 2 个 URL 和两个 django webapps 服务。使用以下示例配置,对 www.server2.com 的获取请求会生成 www.server1.com 的页面。

传入 URL 示例:(在 apache 日志中验证)

www.server1.com

www.server2.com

虚拟主机配置:

*服务器1

<VirtualHost *:80>
        ServerName www.server1.com
        ErrorLog /.../apache/error.log

        AliasMatch ^/([^/]*\.css) /opt/ef/static/css/$1

<Directory "/.../apache">
Allow from all
</Directory>

Alias /media/ /...f/media/
Alias /static/ /...f/static/

<Directory /.../static>
Order deny,allow
Allow from all
</Directory>

<Directory /../media>
Order deny,allow
Allow from all
</Directory>

</VirtualHost>

WSGIScriptAlias / /...apache/server.wsgi

* *服务器2

<VirtualHost *:80>
        ServerName www.server2.com
        ErrorLog /.../apache/error.log

        AliasMatch ^/([^/]*\.css) /opt/ef/static/css/$1

<Directory "/.../apache">
Allow from all
</Directory>

Alias /media/ /...f/media/
Alias /static/ /...f/static/

<Directory /.../static>
Order deny,allow
Allow from all
</Directory>

<Directory /../media>
Order deny,allow
Allow from all
</Directory>

</VirtualHost>

WSGIScriptAlias / /...apache/server.wsgi

我匹配不正确吗?

4

0 回答 0