1
votes

I currently have a client that is using AEM 6.0. As they have some URL's that are lengthy they have been looking for a solution to shorten them without editing a virtual host file and adding redirects to the virtual host (they do not have the proper knowledge to do that). The only solution I found was to use vanity urls which per my research is supported in AEM 6.0 and as of Dispatcher 4.1.9.

Currently they have a dispatcher version 4.1.10 and I have gone through the AEM documentation https://docs.adobe.com/docs/en/dispatcher/disp-config.html#par_title_21 that discribes how to configure the Dispatcher and Publisher to enable access to vanity urls.

So far:

I have installed the VanityURLS-Components package on the Publisher.

I have added the following configuration to the dispatcher.any on the Dispatcher:

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

and checked that the paths are correct.

I have created /tmp/vanity_urls file with ownership of apache:apache (this is on Centos) and permissions of 777.

And I have restarted apache.

Despite these steps it looks like I've overlooked something as /tmp/vanity_urls is not being updated. Maybe there is something I am not understanding here but I thought that the dispatcher updated every x seconds (here 300) /tmp/vanity_urls via the Publisher's /libs/granite/dispatcher/content/vanityUrls.html. Then used /tmp/vanity_urls as a whitelist of vanity urls that are allowed.

  1. I am wondering why this is not working, any thoughts ?
  2. Could it be a permission issue on /tmp/vanity_urls ?
  3. Maybe there is something I erroneously assumed ?
  4. Are there existing bugs out there I am unaware of that impact this dispatcher vanity urls feature ?

Any help is welcome ...

Best,

Nicola

UPDATE:

In my logs found the following:

[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

Fairly self explanatory given that my publisher is not on localhost port 8080 ...

Hopefully that should fix my issue will update soon.

Thanks,

Nicola

1
can you check your dispatcher.log here.it would be much easier to tell this after looking at your log.Rajesh Pantula

1 Answers

1
votes

I figured it out it was a network issue nothing to do with AEM, /libs/granite/dispatcher/content/vanityUrls.htm was not accessible from my publisher.