Resource Mapping in AEM 6.4 Just Not Working | Community
Skip to main content
timr69563937
Level 2
September 21, 2018

Resource Mapping in AEM 6.4 Just Not Working

  • September 21, 2018
  • 2 replies
  • 5190 views

I am trying to use resource mapping to handle roots for multiple domains in our AEM 6.4 platform, and it's just not working. It seems like they're just ignored.

For example....

https://domain123.com/content/site123/us/en/ (works)

https://domain123.com/ (mapped to path above, throws 404)

So the domain is getting through the dispatcher to the AEM publish instances, but the mapping never kicks in. The only thing I see in the access_log is for the domain root showing a 404 response. Am I missing something? Is there some checkbox to enable something hidden in some configuration dialog somewhere?

Tim

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

2 replies

arunpatidar
Community Advisor
Community Advisor
September 23, 2018

Hi,

Can you share mapping configuration with node structure?

For more info how to create mappings you can check Creating Mapping Definitions in AEM section in below article:

Resource Mapping

Arun Patidar
timr69563937
Level 2
September 24, 2018

Well, I have tried many different variations. Let's look at this one for now. I am trying to use the default AMS URL, because our custom dev domain is internal-only DNS.

So this is the target that should come up when you hit the root....

Claims

This is the root, which should map to the above location but gets a 404....

https://aig-dev64.adobecqms.net/

Here is the mapping in CRXDE....

smacdonald2008
Level 10
September 24, 2018

This node looks like it contains all information documented here:

Configuring an Internal Redirect to /content

To create the mapping that prefixes any request to http://localhost:4503/ with /content:

  1. Using CRXDE navigate to /etc/map/http.
  2. Create a new node:
    • Type sling:Mapping
      This node type is intended for such mappings, though its use is not mandatory.
    • Name localhost_any
  3. Click Save All.
  4. Add the following properties to this node:
    • Name sling:match
      • Type String
      • Value localhost.4503/
    • Name sling:internalRedirect
      • Type String
      • Value /content/
  5. Click Save All.

I see the correct node type and the correct node structure. 

I have asked a few internal ppl to look here.

Adobe Employee
September 24, 2018

Hello timr69563937

One main observation here is that you have a http mapping and you're hitting a https URL. Clearly the HTTPS is getting terminated at the Load Balancer but AEM doesn't know about it. Therefore, AEM tries to map it exactly and as it doesn't find a https mapping for https://aig-dev64.adobecqms.net/ , it errors out with a 404.

You need to do two things

1) Create an https mapping instead. Basically, in your /etc/map, create a https folder with the same set of mappings as http

2) Go to https://host:port/system/console/configMgr/org.apache.felix.http and Enable the setting Enable Proxy/Load Balancer Connection.

See AEM redirecting user back to http if accessed through SSL terminated Load Balancer for more information.

Best Regards,

Aneet Arora

timr69563937
Level 2
September 24, 2018

Thanks, but this doesn't seem to make any difference. Tried with both http and https nodes and with just the https node. I see the same behavior.

arunpatidar
Community Advisor
Community Advisor
September 25, 2018

Hi,

Root Level Mappings apply to the request at large including the scheme, host, port and uri path. To accomplish this a path is constructed from the request lik this {scheme}/{host}.{port}/{uri_path}.

Try to change sling:Match property value with host.port (aig-dev64.adobecqms.net.4503) then try.

Note : You can try with AEM Publish/Author ports.

Arun Patidar