我有一个 Web 应用程序当前在两个 HTTPS 端口上提供服务 - 比如说443和8443。该应用程序有一个 Apache HTTP 服务器作为前端,我在设置 Apache 配置以排除其中一个端口上的某些路径时遇到了麻烦。我在Apache中设置了如下配置
<Location /MyApp>
AuthType SOME_AUTH_MODULE
require user valid-user
</Location>
<Location ~ "/MyApp/(Login.html|Welcome.html)">
Satisfy Any
Allow from all
AuthType None
Require all granted
</Location>
我在 Apache 中设置了我的虚拟主机,如下所示
<VirtualHost _default_:443>
DocumentRoot /path/to/my/files
Servername www.example.com:443
Other details go here
</VirtualHost>
<VirtualHost _default_:8443>
DocumentRoot /path/to/my/files
Servername www.example.com:8443
Other details go here
</VirtualHost>
考虑到Location指令不获取主机和端口信息,上述配置的预期问题是什么?Location 指令是使用第一个匹配条目还是会使用一个之后的条目?
了解 Shibboleth 的人的更多详细信息
第一个位置条目允许用户在 SSO(单点登录)环境中访问应用程序。第二个条目旨在允许用户在不通过 SSO 的情况下访问不同端口 (8443) 上的同一虚拟主机。我们看到的是,请求标头在处理链的末端丢失了。当我删除第二个 Location 条目时,一切正常。