【发布时间】:2012-03-08 11:15:16
【问题描述】:
我有一个 Apache HTTP 服务器,用作 JBoss 部署的 webapp 的代理(通过 https)。我在 conf 文件中有以下条目:
<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>
如您所见,访问 /app 需要有效用户。 问题是:如何编写一个指令,从 JBoss webapp 中排除一个特定文件,以便访问该文件不需要有效用户,例如:
<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。任何帮助将不胜感激。
【问题讨论】:
标签: apache https proxy location