Domain mapping- Issues

Avatar

Avatar
Validate 1
Level 2
blkhatpersian
Level 2

Likes

4 likes

Total Posts

32 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile

Avatar
Validate 1
Level 2
blkhatpersian
Level 2

Likes

4 likes

Total Posts

32 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile
blkhatpersian
Level 2

23-08-2016

Hi everyone,

I am currently struggling to understand how to correctly have my domain mapped on an AEM publish instance. I have an Amazon EC2 instance running Tomcat Linux and have the proper security/network permissions setup. I can connect to my AEM instance with the provided domain Amazon generates, BUT am having issues mapping that incoming domain in AEM.

The content path I want to visit is /content/mysite/index.html. I created the following Sling mapping in etc/http/:

sling:match                          '<awsdomain>.4503'

sling:internalRedirect         'content/mysite/index.html'. 

The redirect does happen, BUT then I start getting the following errors from any of the Javascript files I have "<Javascript file> failed because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.". When I remove the mapping and access /content/mysite/index.html, there are no such errors. I am at a loss at what is wrong.

Side note: I noticed that when a default AEM publish instance is installed the Day CQ Root Mapping configuration is set to "content.html". And this automatically redirects to the outdoor geometrixx website despite there being no specific mappings in etc/http. It was not listed in the 'cheatsheet' sticky post in this forum, and I wonder how it is even working and if its related to my current issue.

Thank you,

Ali



 

Replies

Avatar

Avatar
Validate 1
Level 2
blkhatpersian
Level 2

Likes

4 likes

Total Posts

32 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile

Avatar
Validate 1
Level 2
blkhatpersian
Level 2

Likes

4 likes

Total Posts

32 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile
blkhatpersian
Level 2

23-08-2016

Can anyone confirm at least if the sling:mapping is set up correctly to achieve my goal?

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

23-08-2016

The sling mapping looks fine as per the AEM dics here: https://docs.adobe.com/docs/en/aem/6-1/deploy/configuring/resource-mapping.html. I have never heard of the other issue.i will check with support.

Avatar

Avatar
Validate 1
Level 1
aniruddhak91265
Level 1

Likes

0 likes

Total Posts

8 posts

Correct reply

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

Avatar
Validate 1
Level 1
aniruddhak91265
Level 1

Likes

0 likes

Total Posts

8 posts

Correct reply

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

24-08-2016

in which browser you are tyring,can you try in Firefox 

Avatar

Avatar
Validate 1
Level 2
blkhatpersian
Level 2

Likes

4 likes

Total Posts

32 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile

Avatar
Validate 1
Level 2
blkhatpersian
Level 2

Likes

4 likes

Total Posts

32 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile
blkhatpersian
Level 2

24-08-2016

Thanks Scott! And aniruddhak, I have used Firefox and Chrome.

I may have stumbled upon what is wrong. I found this post when I was looking for potential problems with Jetty serving incorrect MIME types. http://stackoverflow.com/questions/15852443/why-is-jetty-serving-css-with-text-html-content-type

It seemed like the default servlet/servletContext was being bypassed for some reason with my mapping. I then went to system/console/configMgr and looked up the Apache Felix Jetty Based Http Service. Sure enough there was the following field with a "/" value.


 

I am not a DevOps expert, but I am going to continue researching the Servlet issue. Any other ideas/comments are appreciated.

Avatar

Avatar
Validate 1
Level 2
blkhatpersian
Level 2

Likes

4 likes

Total Posts

32 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile

Avatar
Validate 1
Level 2
blkhatpersian
Level 2

Likes

4 likes

Total Posts

32 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile
blkhatpersian
Level 2

24-08-2016

It is Servlet related, in terms of which is decided on by Sling. The mapping I described above produces the following request log for the css file. Note how the servlet used is DefaultGetServlet and how slingRequestPathInfo is incorrect( putting the path to the Page resource, labeling the extension as 'htmletc', and the suffix).
 

0 (2016-08-24 22:29:37) TIMER_START{Request Processing} 0 (2016-08-24 22:29:37) COMMENT timer_end format is {<elapsed msec>,<timer name>} <optional message> 0 (2016-08-24 22:29:37) LOG Method=GET, PathInfo=/etc/designs/dashboardangular/coredashboard.css 0 (2016-08-24 22:29:37) TIMER_START{ResourceResolution} 0 (2016-08-24 22:29:37) TIMER_END{0,ResourceResolution} URI=/etc/designs/dashboardangular/coredashboard.css resolves to Resource=JcrNodeResource, type=cq:Page, superType=null, path=/content/dashboardangular/index 0 (2016-08-24 22:29:37) LOG Resource Path Info: SlingRequestPathInfo: path='/content/dashboardangular/index', selectorString='null', extension='htmletc', suffix='/designs/dashboardangular/coredashboard.css' 0 (2016-08-24 22:29:37) TIMER_START{ServletResolution} 0 (2016-08-24 22:29:37) TIMER_START{resolveServlet(JcrNodeResource, type=cq:Page, superType=null, path=/content/dashboardangular/index)} 0 (2016-08-24 22:29:37) TIMER_END{0,resolveServlet(JcrNodeResource, type=cq:Page, superType=null, path=/content/dashboardangular/index)} Using servlet org.apache.sling.servlets.get.DefaultGetServlet 0 (2016-08-24 22:29:37) TIMER_END{0,ServletResolution} URI=/etc/designs/dashboardangular/coredashboard.css handled by Servlet=org.apache.sling.servlets.get.DefaultGetServlet

 

When I access the site directly or use another mapping, the following request log is produced. Note how it is the HtmlLibraryServlet now and the correct SlingRequestPathInfo is being relayed.

 

0 (2016-08-24 22:31:22) TIMER_START{Request Processing} 0 (2016-08-24 22:31:22) COMMENT timer_end format is {<elapsed msec>,<timer name>} <optional message> 0 (2016-08-24 22:31:22) LOG Method=GET, PathInfo=/etc/designs/dashboardangular/coredashboard.css 0 (2016-08-24 22:31:22) TIMER_START{ResourceResolution} 5 (2016-08-24 22:31:22) TIMER_END{5,ResourceResolution} URI=/etc/designs/dashboardangular/coredashboard.css resolves to Resource=JcrNodeResource, type=cq:ClientLibraryFolder, superType=null, path=/etc/designs/dashboardangular/coredashboard 5 (2016-08-24 22:31:22) LOG Resource Path Info: SlingRequestPathInfo: path='/etc/designs/dashboardangular/coredashboard', selectorString='null', extension='css', suffix='null' 5 (2016-08-24 22:31:22) TIMER_START{ServletResolution} 5 (2016-08-24 22:31:22) TIMER_START{resolveServlet(JcrNodeResource, type=cq:ClientLibraryFolder, superType=null, path=/etc/designs/dashboardangular/coredashboard)} 5 (2016-08-24 22:31:22) TIMER_END{0,resolveServlet(JcrNodeResource, type=cq:ClientLibraryFolder, superType=null, path=/etc/designs/dashboardangular/coredashboard)} Using servlet com.day.cq.widget.impl.HtmlLibraryServlet 5 (2016-08-24 22:31:22) TIMER_END{0,ServletResolution} URI=/etc/designs/dashboardangular/coredashboard.css handled by Servlet=com.day.cq.widget.impl.HtmlLibraryServlet

No idea why the distinction happens