0

我有一个看起来像的虚拟主机:

<VirtualHost *:80>
    ServerName www.mysite.com
    SetOutputFilter DEFLATE
    RedirectMatch ^/manager$ http://www.fna.fi/manager/
    DocumentRoot /build/vhosts/mysite.com
    ErrorLog /build/logs/site.com-error.log
    CustomLog /build/logs/site.com-access.log combined
    ProxyRequests Off
    RewriteEngine on

    ProxyPass /manager http://127.0.0.1:8060/manager/ retry=0
    ProxyPassReverse /manager http://127.0.0.1:8060/manager

    ProxyPass / http://127.0.0.1:8060/app/ retry=0
    ProxyPassReverse / http://127.0.0.1:8060/app/
 </VirtualHost>

现在我想在 /build/vhosts/mysite.com 中添加一个博客。所以它将是:http ://www.mysite.com/blog但是当我访问这个站点时,它看起来像是被转发到 Tomcat(很可能是由于“ProxyPass /...”。

有没有办法让它适用于我的场景?

谢谢!

4

1 回答 1

1

目前任何东西都会被转发到tomcat:

ProxyPass / http://127.0.0.1:8060/app/ retry=0
ProxyPassReverse / http://127.0.0.1:8060/app/

您必须在您的代理指令之前添加一个别名到您的配置:

Alias /blog /build/vhosts/mysite.com
<Location /blog>
    # make some configs for this location like...
    Options FollowSymLinks
    AllowOverride None
</Location>
于 2012-03-30T14:44:11.457 回答