Apache vhosting ubuntu一个命名条目服务所有网址

时间:2013-03-16 22:46:31

标签: django apache2

我有两个URL和两个django webapps可供使用。使用以下示例配置,www.server2.com的get请求将生成www.server1.com的页面。

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

www.server1.com

www.server2.com

vhost confs:

* server1

<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

* * server2的

<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

我匹配不正确吗?

0 个答案:

没有答案