1

我目前有一个使用 AEM 6.0 的客户端。由于他们有一些很长的 URL,他们一直在寻找一种解决方案来缩短它们,而无需编辑虚拟主机文件并向虚拟主机添加重定向(他们没有适当的知识来做到这一点)。我发现的唯一解决方案是使用根据我的研究在 AEM 6.0 和 Dispatcher 4.1.9 中受支持的虚 url。

目前他们有一个调度程序版本 4.1.10,我已经阅读了 AEM 文档https://docs.adobe.com/docs/en/dispatcher/disp-config.html#par_title_21,该文档描述了如何将调度程序和发布程序配置为启用对虚 URL 的访问。

至今:

我已经在 Publisher 上安装了 VanityURLS-Components 包。

我在 Dispatcher 上的 dispatcher.any 中添加了以下配置:

/vanity_urls {
     /url "/libs/granite/dispatcher/content/vanityUrls.html"
     /file "/tmp/vanity_urls"
     /delay 300
}

并检查路径是否正确。

我创建了/tmp/vanity_urls文件,该文件拥有 apache:apache(这是在 Centos 上)和 777 的权限。

我已经重新启动了apache。

尽管有这些步骤,但我似乎忽略了一些东西,因为/tmp/vanity_urls没有被更新。也许这里有一些我不理解的东西,但我认为调度程序通过发布者的/libs/granite/dispatcher/content/vanityUrls.html每 x 秒(这里 300) /tmp/vanity_urls更新一次。然后使用/tmp/vanity_urls作为允许的虚 url 的白名单。

  1. 我想知道为什么这不起作用,有什么想法吗?
  2. 这可能是/tmp/vanity_urls的权限问题吗?
  3. 也许我错误地假设了什么?
  4. 是否存在我不知道会影响此调度程序虚 url 功能的现有错误?

欢迎任何帮助...

最好的,

尼古拉

更新:

在我的日志中发现以下内容:

[Thu Oct 08 16:11:03 2015] [D] [1780(140151407138784)] Vanity URL file (/tmp/vanity_urls) too old (1443478601 < 1444345863) on startup, fetching...
[Thu Oct 08 16:11:03 2015] [D] [1780(140151407138784)] Creating new socket: 127.0.0.1:8080
[Thu Oct 08 16:11:03 2015] [W] [1780(140151407138784)] Unable to connect to 127.0.0.1:8080: Connection refused
[Thu Oct 08 16:11:03 2015] [D] [1780(140151407138784)] incomplete request, no socket reuse
[Thu Oct 08 16:11:03 2015] [E] [1780(140151407138784)] Unable to fetch vanity URLs on farm website: no backend available.
[Thu Oct 08 16:11:03 2015] [D] [1780(140151407138784)] Loaded 0 vanity URLs from file /tmp/vanity_urls

考虑到我的发布者不在 localhost 端口 8080 上,这一点相当不言自明......

希望这应该解决我的问题,很快就会更新。

谢谢,

尼古拉

4

1 回答 1

1

我发现这是一个与 AEM 无关的网络问题,我的发布者无法访问 /libs/granite/dispatcher/content/vanityUrls.htm。

于 2015-10-08T23:50:40.500 回答