2012-03-08 36 views
1

我有一個Apache HTTP服務器,用作JBoss部署的webapp的代理服務器(通過https)。我在conf文件如下條目:Apache HTTP Server位置指令 - 排除url

<Location "/app"> 
    ProxyPass   http://localhost:8080/app 
    ProxyPassReverse http://localhost:8080/app 
    AuthType Basic 
    AuthName "Private Documentation Repository" 
    AuthUserFile <path-to-file> 
    Require valid-user 
</Location> 

,你可以看到,一個有效的用戶才能訪問/應用程序。 的問題是:如何寫一個指令,將排除JBoss的web應用程序的一個特定文件,使之進入這個文件將不會需要一個有效的用戶如:

<Location "/app/some-file.xyz"> 
    ProxyPass   http://localhost:8080/app/some-file.xyz 
    ProxyPassReverse http://localhost:8080/app/some-file.xyz 
</Location> 

我的意思是:當用戶請求任何東西( app /),但是/app/some-file.xyz他/她會被提示輸入密碼,否則Apache將使用戶下載some-file.xyz。任何幫助將不勝感激。

回答

1
<Location "/app/*.xyz"> 
    allow from all 
    satisfy any 
    ProxyPass   http://localhost:8080/app/*.xyz 
    ProxyPassReverse http://localhost:8080/app/*.xyz 
</Location> 
+0

正是我所需要的;) – pkdkk 2012-10-02 10:55:37