Vanity url is not working with dispatcher in AEM 6.4 | Community
Skip to main content
Anderson_Hamer
Level 4
May 14, 2020

Vanity url is not working with dispatcher in AEM 6.4

  • May 14, 2020
  • 2 replies
  • 17048 views
 
I am trying to setup vanity url in AEM 6.4. Followed and verified the below steps
  • Installed the VanityURLS-Components
  • Allowed ‘Read’ permission to /libs/granite/dispatcher/content/vanityUrls for the ‘everyone’ group on the publish servers
  • Added a filter rule in the dispatcher to allow the vanity URL

    /0100 { /type "allow" /url "/libs/granite/dispatcher/content/vanityUrls.html" }

  • Added a caching rule to prevent caching of this URL

    /0001 { /type "deny" /glob "/libs/granite/dispatcher/content/vanityUrls.html" }

  • Added the vanity_urls configuration to the farm:

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

  • Restarted webserver

  • Created a file inside file location and provide required write permission. -rwxr-xr-x 1 apache apache 0 May 14 14:26 vanity_urls
  • Verified /libs/granite/dispatcher/content/vanityUrls.html page is accessible from pub as anonymous request
  • Verified /libs/granite/dispatcher/content/vanityUrls.html page is accessible from dispatcher
  • Verified all required modules are enabled in Apache
  • Verified that dispatcher is calling pub server upon hitting the /libs/granite/dispatcher/content/vanityUrls.html, seeing logs in request.log
  • Finally restarted Apache Sling Resource Resolver bundle and simply saved it's configuration and restarted AEM server

Dispatcher logs:-

[root@disp-server-1:/path/path]# tail -f *.log | grep vanityUrls
[Fri May 15 10:21:27 2020] [D] checking [/libs/granite/dispatcher/content/vanityUrls.html]
[Fri May 15 10:21:27 2020] [D] cache-action for [/libs/granite/dispatcher/content/vanityUrls.html]: NONE
[Fri May 15 10:21:27 2020] [I] "GET /libs/granite/dispatcher/content/vanityUrls.html?Ad3=3" 200 none [farm/rend01] 40ms
10.56.0.58 - - [15/May/2020:10:21:27 +0000] "GET /libs/granite/dispatcher/content/vanityUrls.html?Ad3=3 HTTP/1.1" 200 172 "-" "Amazon CloudFront"


2020-05-15-dispatcher.log:[Fri May 15 10:26:20 2020] [D] checking [/content/demosite/en/game1]
2020-05-15-dispatcher.log:[Fri May 15 10:26:20 2020] [D] request URL has no extension: /content/demosite/en/game1
2020-05-15-dispatcher.log:[Fri May 15 10:26:20 2020] [D] cache-action for [/content/demosite/en/game1]: NONE
2020-05-15-dispatcher.log:[Fri May 15 10:26:20 2020] [I] "GET /content/demosite/en/game1" 404 none [farm/rend01] 21ms

game1 is the vanity url here.

 

The vanityurl is working only on publisher server and not on the dispatcher side.I have tried all the possible option but could not find out why it is not working? The pain part is there is no error messages in the any of the logs. Has anyone faced similar issue? Please help me to investigate further on this issue?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Adobe Employee
May 14, 2020

With the Dispatcher log level at DEBUG can you share the log output for the vanityUrl request? 

 

Do you have the vanityurls component installed?

It's an old package from 2015 that oddly enough doesn't come with the product ootb.

 

Anderson_Hamer
Level 4
May 15, 2020
Downloaded the package from package share - https://www.adobeaemcloud.com/content/marketplace/marketplaceProxy.html?packagePath=/content/companies/public/adobe/packages/cq600/component/vanityurls-components Package version - vanityurls-components-1.0.2 Is there any higher versions available?
Singaiah_Chintalapudi
Level 7
May 14, 2020

Hi,

 

For me, it looks like dispatcher filter is blocking the requests and not sending them to publisher. Once you enable the debug logs, you should be able to see this info on dispatcher log.

 

Look at the rules order where you're allowing and denying the access to /libs.

 

Thanks.

Anderson_Hamer
Level 4
May 15, 2020
Hi Noksc - No, the dispatcher is not blocking this path. vanityUrls service is accessible even from dispatcher URL – https:/{disaptherDomain}/libs/granite/dispatcher/content/vanityUrls.html. I could also the Dispatcher is making call to AEM publisher, the response to this request is 200 as well. Allowing this path - /0100 { /type "allow" /url "/libs/granite/dispatcher/content/vanityUrls.html" } Not caching this path - /0001 { /type "deny" /glob "/libs/granite/dispatcher/content/vanityUrls.html" }
Level 3
July 16, 2020

@anderson_hamer Can you please confirm if this issue got resolved? I am also facing the same issue