Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Resource Mapping in AEM 6.4 Just Not Working

Avatar

Level 2

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

9 Replies

Avatar

Community Advisor

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

Avatar

Level 2

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

resource-mapper.png

Avatar

Level 10

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.

Avatar

Level 10

Check request log file to see if there are more details.

Avatar

Level 2

All I see in the request log is the 404 for the root....

10.4.0.29 - - [24/Sep/2018:07:58:22 -0700] "GET / HTTP/1.1" 404 198 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"

Avatar

Level 5

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

Avatar

Level 2

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.

Avatar

Community Advisor

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