Hi everyone,
I'm trying to implement the Vanity URLs in AEM to give the authors a way to enter the vanity URLs themselves in the page properties, We are currently using Mod_Proxy and Mod_Rewrites which we want to get off by using Adobe VanityUrls, I'm following these documentations https://blog.rackspace.com/enabling-vanity-urls-with-adobe-experience-manager and the same is mentioned in Adobe dispatcher configuration as-well here's the link Configuring Dispatcher
My issues/doubts here are
1.Creation of /libs/granite/dispatcher/content/vanityUrls.html file, Does that file get created automatically or do we have to create it manually, It is not getting created automatically for me, when I created it manually It doesn't seem to have anything in the file it's always empty(Do we have to add any code or text in this file)
2.Creation of /tmp/vanity_urls in dispatcher Instance(AWS) Will this be created automatically or to be manually created, It didn't work when I created manually
3. Adobe mentions this point (For each vanity URL that you have configured for an AEM or CQ page, ensure that the /filter configuration denies the URL. If necessary, add a filter that denies the URL. ) in Configuring Dispatcher , Does this mean we have to deny the original path in the dispatcher?
Please clarify on these, Appreciate a lot, Here is the dispatcher.log file
[Thu Mar 08 16:34:36 2018] [D] [pid 5705] Found farm publishfarm for 127.0.0.1
[Thu Mar 08 16:34:36 2018] [D] [pid 5705] checking [/nginx_status]
[Thu Mar 08 16:34:36 2018] [D] [pid 5705] request URL has no extension: /nginx_status
[Thu Mar 08 16:34:36 2018] [D] [pid 5705] cache-action for [/nginx_status]: NONE
[Thu Mar 08 16:34:36 2018] [D] [pid 5705] Checking vanity URLs
[Thu Mar 08 16:34:36 2018] [D] [pid 5705] Vanity URL file (/tmp/vanity_urls) modified, reloading...
[Thu Mar 08 16:34:36 2018] [D] [pid 5705] Loaded 0 vanity URLs from file /tmp/vanity_urls
[Thu Mar 08 16:34:36 2018] [D] [pid 5705] Filter rejects: GET /nginx_status HTTP/1.1
[Thu Mar 08 16:34:36 2018] [I] [pid 5705] "GET /nginx_status" - - 0ms [publishfarm/-]
[Thu Mar 08 16:34:41 2018] [D] [pid 5706] Found farm publishfarm for 127.0.0.1
[Thu Mar 08 16:34:41 2018] [D] [pid 5706] checking [/nginx_status]
[Thu Mar 08 16:34:41 2018] [D] [pid 5706] request URL has no extension: /nginx_status
[Thu Mar 08 16:34:41 2018] [D] [pid 5706] cache-action for [/nginx_status]: NONE
[Thu Mar 08 16:34:41 2018] [D] [pid 5706] Checking vanity URLs
[Thu Mar 08 16:34:41 2018] [D] [pid 5706] Vanity URL file (/tmp/vanity_urls) modified, reloading...
[Thu Mar 08 16:34:41 2018] [D] [pid 5706] Loaded 0 vanity URLs from file /tmp/vanity_urls
[Thu Mar 08 16:34:41 2018] [D] [pid 5706] Filter rejects: GET /nginx_status HTTP/1.1
[Thu Mar 08 16:34:41 2018] [I] [pid 5706] "GET /nginx_status" - - 0ms [publishfarm/-]
Thanks in advance
Solved! Go to Solution.
Views
Replies
Total Likes
As I see it, you have 4 vanity urls enabled:
/geogov
/testvanity
/geohome
/testing
You should be able to request them through the dispatcher.
The file /tmp/vanity_urls should have the same content. If not, it’s probably bad configurati of the dispatcher or a file permission problem.
Also so note that due to the configured delay of 300s you have to wait that long after publishing the page until the vanity url becomes available.
Views
Replies
Total Likes
Basically when you use Vanity URLs all the vanity urls are stored in a file. Whenever a request is recieved by the dispatcher first it checks the filter section if there is rule for that request. If not then it consults the vanity url file. Now lets come to your doubts:
1.Yes, Creation of /libs/granite/dispatcher/content/vanityUrls.html file will be automatically. You DONT need to do it manually.
2. Yes, Creation of /tmp/vanity_urls in dispatcher Instance(AWS) Will this be created automatically
3. Adobe mentions this point (For each vanity URL that you have configured for an AEM or CQ page, ensure that the /filter configuration denies the URL. If necessary, add a filter that denies the URL. ) in Configuring Dispatcher , Does this mean we have to deny the original path in the dispatcher?
Yes You need to deny all the URLs which are vanity url from Filter section. These urls will be automatically added to vanity url file which will be used by dispatcher to serve the request.
Hope this helps!
Views
Replies
Total Likes
I tried that but didn't work, Here is my dispatcher configuration, /content/sling-tv/en/testpages/seth.html is the page I had vanity URL on
55 /filter
56 {
57 # deny everything and allow specific entries
58 /0001 { /type "deny" /glob "*" }
59 # open consoles
60 /0100 { /type "allow" /url "/libs/granite/dispatcher/content/vanityUrls.html" }
61 # /0012 { /type "allow" /glob "* /crx/*" } # allow content repository
62 # /0013 { /type "allow" /glob "* /system/*" } # allow OSGi console
63
64 # allow non-public content directories
65 # /0021 { /type "allow" /glob "* /apps/*" } # allow apps access
66 /0022 { /type "allow" /glob "* /bin/*" }
67 /0023 { /type "allow" /glob "* /content*" } # disable this rule to allow mapped content only
68 /0024 { /type "deny" /url "/content/sling-tv/en/testpages/seth.html" }
69 /0025 { /type "allow" /url "/libs/granite/dispatcher/content/vanityUrls.html" }
118 /vanity_urls {
119 /url "/libs/granite/dispatcher/content/vanityUrls.html"
120 /file "/tmp/vanity_urls"
121 /delay 300
122 }
123
Views
Replies
Total Likes
Did you put a Deny Rule for Caching the "/libs/granite/dispatcher/content/vanityUrls.html" file?
Like this?
/0001 { /type "deny" /glob
"/libs/granite/dispatcher/content/vanityUrls.html" }
Views
Replies
Total Likes
You can find the documentation on how to set up vanity urls at Configuring Dispatcher. Just follow the documentation and install the extra package mentioned there.
Views
Replies
Total Likes
I followed every step of the documentation here Configuring Dispatcher and also installed the afore-mentioned package, But it doesn't work I still see the same dispatcher log errors
[Thu Mar 08 16:34:36 2018] [D] [pid 5705] Found farm publishfarm for 127.0.0.1
[Thu Mar 08 16:34:36 2018] [D] [pid 5705] checking [/nginx_status]
[Thu Mar 08 16:34:36 2018] [D] [pid 5705] request URL has no extension: /nginx_status
[Thu Mar 08 16:34:36 2018] [D] [pid 5705] cache-action for [/nginx_status]: NONE
[Thu Mar 08 16:34:36 2018] [D] [pid 5705] Checking vanity URLs
[Thu Mar 08 16:34:36 2018] [D] [pid 5705] Vanity URL file (/tmp/vanity_urls) modified, reloading...
[Thu Mar 08 16:34:36 2018] [D] [pid 5705] Loaded 0 vanity URLs from file /tmp/vanity_urls
[Thu Mar 08 16:34:36 2018] [D] [pid 5705] Filter rejects: GET /nginx_status HTTP/1.1
[Thu Mar 08 16:34:36 2018] [I] [pid 5705] "GET /nginx_status" - - 0ms [publishfarm/-]
[Thu Mar 08 16:34:41 2018] [D] [pid 5706] Found farm publishfarm for 127.0.0.1
[Thu Mar 08 16:34:41 2018] [D] [pid 5706] checking [/nginx_status]
[Thu Mar 08 16:34:41 2018] [D] [pid 5706] request URL has no extension: /nginx_status
[Thu Mar 08 16:34:41 2018] [D] [pid 5706] cache-action for [/nginx_status]: NONE
[Thu Mar 08 16:34:41 2018] [D] [pid 5706] Checking vanity URLs
[Thu Mar 08 16:34:41 2018] [D] [pid 5706] Vanity URL file (/tmp/vanity_urls) modified, reloading...
[Thu Mar 08 16:34:41 2018] [D] [pid 5706] Loaded 0 vanity URLs from file /tmp/vanity_urls
[Thu Mar 08 16:34:41 2018] [D] [pid 5706] Filter rejects: GET /nginx_status HTTP/1.1
[Thu Mar 08 16:34:41 2018] [I] [pid 5706] "GET /nginx_status" - - 0ms [publishfarm/-]
Views
Replies
Total Likes
Try to run this on your dispatcher manually:
curl -v http://<insert hostname of your publisher here>:4502/libs/granite/dispatcher/content/vanityUrls.html
Does it work? Or do you have an error?
And did you publish your content page after you entered the vanity URL property?
Views
Replies
Total Likes
Did you mean 4502 or 4503? here is the response for both
[root@i-043558b2508b470c1 saiganesh.boggavarap]# cd /
[root@i-043558b2508b470c1 /]# curl -v http://publish.intd-slingtv.com:4502/libs/granite/dispatcher/content/vanityUrls.html
* About to connect() to publish.intd-slingtv.com port 4502 (#0)
* Trying 10.235.13.12...
* Connection refused
* Failed connect to publish.intd-slingtv.com:4502; Connection refused
* Closing connection 0
curl: (7) Failed connect to publish.intd-slingtv.com:4502; Connection refused
[root@i-043558b2508b470c1 /]# curl -v http://publish.intd-slingtv.com:4503/libs/granite/dispatcher/content/vanityUrls.html
* About to connect() to publish.intd-slingtv.com port 4503 (#0)
* Trying 10.235.13.12...
* Connected to publish.intd-slingtv.com (10.235.13.12) port 4503 (#0)
> GET /libs/granite/dispatcher/content/vanityUrls.html HTTP/1.1
> User-Agent: curl/7.29.0
> Host: publish.intd-slingtv.com:4503
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Fri, 16 Mar 2018 15:54:17 GMT
< X-Content-Type-Options: nosniff
< Content-Type: text/plain; charset=UTF-8
< Content-Length: 38
<
/geogov
/testvanity
/geohome
/testing
* Connection #0 to host publish.intd-slingtv.com left intact
[root@i-043558b2508b470c1 /]# ^C
[root@i-043558b2508b470c1 /]#
Yes, I did publish the Page after entering the Property!
Thanks,
Ganesh.
Views
Replies
Total Likes
Did it work?
Views
Replies
Total Likes
As I see it, you have 4 vanity urls enabled:
/geogov
/testvanity
/geohome
/testing
You should be able to request them through the dispatcher.
The file /tmp/vanity_urls should have the same content. If not, it’s probably bad configurati of the dispatcher or a file permission problem.
Also so note that due to the configured delay of 300s you have to wait that long after publishing the page until the vanity url becomes available.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Like
Replies