2

SDL Sites 9.1 and DXA 2.2 is set up, DXA 2.2 Default site is working on a defined URL. When we wanted to set up a local web app to work with for example http://localhost:9070, we did the following:

  • changed web.config and all configuration files to match the staging environment
  • built app
  • changed Website configuration (Set-TtmWebsite to have two base URL, where the second one matches to http://localhost:9070)
  • Checked topology DB and the URL is there also
  • Checked in CM Topology section and it shows the URL

When we open URL locally or on the server, there is information No matching Localization found for URL 'http://localhost:9070/'

Locally, there is a Binary folder, but it contains only the system/config folder.

Any idea what this second URL is not working?

1 Answer 1

1

Topology Manager Mapping changes - actually this is automatically propagated to the Discovery Service database. but I have seen some cases where the Discovery Service was out-of-sync with Topology Manager for some reason. You can force sync the Discovery Service using the Sync-TtmCdEnvironment cmdlet.

Or could be cached in discovery - try to restart and validate your new base URL is appears in the discovery database.

You can also validate using graphql query, The following sample makes a request to fetch the relevant mapping information for a Publication with the specified URL:

{
  publicationMapping(namespaceId: 1, siteUrl: "http://localhost:9070/index.html") {
    domain
    port
    path
    pathScanDepth
    publicationId
  }
}

I hope it helps

6
  • I have done already that cmdlet. After running DNS-NAME:8082/discovery.svc/PublicationMappings('8')/…, there are two base URLs, one for localhost (not working) and a second one for a full DNS name (working URL) Commented Jan 16, 2020 at 12:44
  • Republish the “Publish Settings” Page to ensure the URL configuration is up-to-date in DXA config (_all.json)
    – Velmurugan
    Commented Jan 16, 2020 at 12:50
  • Done it, removed the Binary folder from website root, but no results. If I try with locahost:9070 same issue still (no localization found), if I use full site URL with DNS name it works. Tried with admin/refresh but no results. Commented Jan 16, 2020 at 13:09
  • This is very strange, but if I add new binding for example 9050, and add it as base URL for that website, localhost:9050 is working from both locations, server and from my local machine (for development purpose). Very, very awkward behavior Commented Jan 16, 2020 at 13:24
  • There was misconfiguration with additional URL as base URL setup Commented Jan 20, 2020 at 9:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.