AEM - 通过调度程序访问受限页面重定向到发布者登录页面
AEM - visiting restricted page via dispatcher redirects to publisher login page
我是一名 DevOps 工程师,从一位已离开组织的 AEM 开发人员那里继承了 AEM 6.5 环境。该架构由一个调度程序实例、一个作者实例和一个发布者实例组成。目前,调度程序配置为从发布者实例中获取和缓存内容,并从缓存中为用户提供内容。
当用户尝试访问受限页面(任何需要用户登录的页面)时,它适用于除登录页面之外的所有页面。通过调度程序实例 (https://example.com/site/restricted.html) it performs a 302 redirect to the login page on the publisher instance (https://publish.example.com/site/login.html). This is the same behavior which occurs if a user visits the restricted page directly on the publisher instance (https://publish.example.com/site/restricted.html) 访问受限页面时,但这不是通过调度程序实例访问站点时所需的行为。
我试图做到这一点,以便在通过调度程序实例访问受限页面时,用户通过调度程序 (https://example.com/site/login.html) 被带到登录页面,而不是重定向到发布者实例。用户在任何时候都不应该看到 publish
出现在 URL 中,发布者实例的存在也不应该对站点访问者可见。
我无法找到此重定向所在的位置 defined/configured。以下是我迄今为止的研究总结:
我检查了 httpd.conf
和所有 conf.d
文件中调度程序实例上的所有 Apache 配置,没有重写规则或重定向似乎会导致此行为。在任何 conf 文件或 VirtualHost
块中都没有对发布者实例 IP 地址、主机名、URL 或子域的引用。
我已经查看了 mod_dispatcher.so
模块的 dispatcher.conf
配置文件中调度程序实例的所有调度程序配置,似乎也没有任何相关内容。对发布者实例的唯一引用是在 dispatcher.any
.
中的 /farms/renders
块中
我检查了作者和发布者实例配置 Web 控制台 (https://publish.example.com/system/console/configMgr) 中列出的每个配置选项,其中包括以下任何术语:login
、[= 20=、restricted
、authorization
和 authentication
,但找不到任何相关的内容。
我还在 CRXDE Lite 的作者和发布 (https://publish.example.com/crx/de/index.jsp) 中搜索了相同的术语,但没有找到任何相关内容。我找到了 login.html
页面及其子节点 jcr:content
组件,但在属性中没有关于重定向的内容。
我已经进入发布服务器实例并检查了 /opt/aem/crx-quickstart/conf
的内容。我看到 bundles.json
、cq.pid
、quickstart.properties
和 sling.properties
,但其中 none 有任何线索。
我在 /opt/aem/crx-quickstart/launchpad/config/com/day/cq/auth/impl/LoginSelectorHandler.config
找到了一个文件,其中包含:
:org.apache.felix.configadmin.revision:=L"1"
auth.loginselector.defaultloginpage="/libs/granite/core/content/login"
auth.loginselector.mappings=[ \
"/libs/granite/core/content/login:/login", \
]
但我不确定它指的是什么。服务器上没有 /libs/granite/core/content
目录。
还可以在哪里定义此重定向行为?
还要检查 /system/console/configMgr
中的 Apache Sling Resource Resolver Factory 和 Day CQ Link Externalizer
中定义的可能映射。
我是一名 DevOps 工程师,从一位已离开组织的 AEM 开发人员那里继承了 AEM 6.5 环境。该架构由一个调度程序实例、一个作者实例和一个发布者实例组成。目前,调度程序配置为从发布者实例中获取和缓存内容,并从缓存中为用户提供内容。
当用户尝试访问受限页面(任何需要用户登录的页面)时,它适用于除登录页面之外的所有页面。通过调度程序实例 (https://example.com/site/restricted.html) it performs a 302 redirect to the login page on the publisher instance (https://publish.example.com/site/login.html). This is the same behavior which occurs if a user visits the restricted page directly on the publisher instance (https://publish.example.com/site/restricted.html) 访问受限页面时,但这不是通过调度程序实例访问站点时所需的行为。
我试图做到这一点,以便在通过调度程序实例访问受限页面时,用户通过调度程序 (https://example.com/site/login.html) 被带到登录页面,而不是重定向到发布者实例。用户在任何时候都不应该看到 publish
出现在 URL 中,发布者实例的存在也不应该对站点访问者可见。
我无法找到此重定向所在的位置 defined/configured。以下是我迄今为止的研究总结:
我检查了
httpd.conf
和所有conf.d
文件中调度程序实例上的所有 Apache 配置,没有重写规则或重定向似乎会导致此行为。在任何 conf 文件或VirtualHost
块中都没有对发布者实例 IP 地址、主机名、URL 或子域的引用。我已经查看了
中的mod_dispatcher.so
模块的dispatcher.conf
配置文件中调度程序实例的所有调度程序配置,似乎也没有任何相关内容。对发布者实例的唯一引用是在dispatcher.any
./farms/renders
块中我检查了作者和发布者实例配置 Web 控制台 (https://publish.example.com/system/console/configMgr) 中列出的每个配置选项,其中包括以下任何术语:
login
、[= 20=、restricted
、authorization
和authentication
,但找不到任何相关的内容。我还在 CRXDE Lite 的作者和发布 (https://publish.example.com/crx/de/index.jsp) 中搜索了相同的术语,但没有找到任何相关内容。我找到了
login.html
页面及其子节点jcr:content
组件,但在属性中没有关于重定向的内容。我已经进入发布服务器实例并检查了
/opt/aem/crx-quickstart/conf
的内容。我看到bundles.json
、cq.pid
、quickstart.properties
和sling.properties
,但其中 none 有任何线索。我在
/opt/aem/crx-quickstart/launchpad/config/com/day/cq/auth/impl/LoginSelectorHandler.config
找到了一个文件,其中包含::org.apache.felix.configadmin.revision:=L"1" auth.loginselector.defaultloginpage="/libs/granite/core/content/login" auth.loginselector.mappings=[ \ "/libs/granite/core/content/login:/login", \ ]
但我不确定它指的是什么。服务器上没有
/libs/granite/core/content
目录。
还可以在哪里定义此重定向行为?
还要检查 /system/console/configMgr
中的 Apache Sling Resource Resolver Factory 和 Day CQ Link Externalizer
中定义的可能映射。