Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Vanity url is not working with dispatcher in AEM 6.4

Avatar

Avatar
Validate 1
Level 3
Anderson_Hamer
Level 3

Likes

13 likes

Total Posts

34 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 5
View profile

Avatar
Validate 1
Level 3
Anderson_Hamer
Level 3

Likes

13 likes

Total Posts

34 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 5
View profile
Anderson_Hamer
Level 3

14-05-2020

 
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?

AEM 6.4 Dispatcher vanity

Replies

Avatar

Avatar
Ignite 1
Employee
aemmarc
Employee

Likes

184 likes

Total Posts

243 posts

Correct Reply

92 solutions
Top badges earned
Ignite 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Ignite 1
Employee
aemmarc
Employee

Likes

184 likes

Total Posts

243 posts

Correct Reply

92 solutions
Top badges earned
Ignite 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile
aemmarc
Employee

14-05-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.

 

Screen Shot 2020-05-14 at 1.28.07 PM.png

Avatar

Avatar
Validate 25
MVP
Singaiah_Chintalapudi
MVP

Likes

130 likes

Total Posts

233 posts

Correct Reply

38 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Ignite 5
Ignite 3
View profile

Avatar
Validate 25
MVP
Singaiah_Chintalapudi
MVP

Likes

130 likes

Total Posts

233 posts

Correct Reply

38 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Ignite 5
Ignite 3
View profile
Singaiah_Chintalapudi
MVP

14-05-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.

Avatar

Avatar
Validate 1
Level 3
Anderson_Hamer
Level 3

Likes

13 likes

Total Posts

34 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 5
View profile

Avatar
Validate 1
Level 3
Anderson_Hamer
Level 3

Likes

13 likes

Total Posts

34 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 5
View profile
Anderson_Hamer
Level 3

15-05-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" }

Avatar

Avatar
Validate 1
Level 3
Anderson_Hamer
Level 3

Likes

13 likes

Total Posts

34 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 5
View profile

Avatar
Validate 1
Level 3
Anderson_Hamer
Level 3

Likes

13 likes

Total Posts

34 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 5
View profile
Anderson_Hamer
Level 3

15-05-2020

Downloaded the package from package share - https://www.adobeaemcloud.com/content/marketplace/marketplaceProxy.html?packagePath=/content/compani... Package version - vanityurls-components-1.0.2 Is there any higher versions available?

Avatar

Avatar
Validate 1
Level 3
Anderson_Hamer
Level 3

Likes

13 likes

Total Posts

34 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 5
View profile

Avatar
Validate 1
Level 3
Anderson_Hamer
Level 3

Likes

13 likes

Total Posts

34 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 5
View profile
Anderson_Hamer
Level 3

15-05-2020

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

Avatar

Avatar
Validate 1
Level 3
Anderson_Hamer
Level 3

Likes

13 likes

Total Posts

34 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 5
View profile

Avatar
Validate 1
Level 3
Anderson_Hamer
Level 3

Likes

13 likes

Total Posts

34 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 5
View profile
Anderson_Hamer
Level 3

15-05-2020

Updated the dispatcher logs in description section

Avatar

Avatar
Validate 1
Level 2
pn_2007
Level 2

Likes

4 likes

Total Posts

42 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
pn_2007
Level 2

Likes

4 likes

Total Posts

42 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 3
Boost 1
View profile
pn_2007
Level 2

16-07-2020

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

Avatar

Avatar
Validate 1
Level 3
Anderson_Hamer
Level 3

Likes

13 likes

Total Posts

34 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 5
View profile

Avatar
Validate 1
Level 3
Anderson_Hamer
Level 3

Likes

13 likes

Total Posts

34 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 5
View profile
Anderson_Hamer
Level 3

29-07-2020

Yes, it resolved. Rewrite rules were causing the issue.

Avatar

Avatar
Validate 1
Level 3
subrato_kha
Level 3

Likes

10 likes

Total Posts

49 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 5
View profile

Avatar
Validate 1
Level 3
subrato_kha
Level 3

Likes

10 likes

Total Posts

49 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Ignite 5
Ignite 3
Ignite 1
Give Back 5
View profile
subrato_kha
Level 3

17-08-2020

@Anderson_Hamer : We are also facing the same issue. What changes you have done in apache config which fixed the issue