This article describes how to set up and access the PWA sitemaps generated by Intershop Commerce Management, which are located in the $IS_SHARE/sites/... directory.
Apply all changes from the PWA Pull Request #918 by cherry picking or by updating the PWA to 1.4+ to be able to access generated PWA sitemaps from the ICM server via REST.
Fix: make ICM sitemap files available via nginx #918
Making the sitemap files available requires NGINX proxy functionality. The environment variable 'ICM_BASE_URL'
has to be specified for the NGINX container and points to the ICM backend installation, e.g. 'https://jxdemoserver6.intershop.de'
.
nginx: ... environment: + ICM_BASE_URL: 'https://jxdemoserver6.intershop.de' ...
Please note that this approach does not consider the setup of multiple ICM environments. For this, further adjustments have to be made to the PWA project. For details, please refer to Multi Site Configurations in the PWA documentation at GitHub.
The ICM server that generates the PWA sitemaps requires an additional domain splitting configuration for the PWA host to ensure that the sitemap links are generated correctly:
+ <domainsplitting name="main PWA host for en_US and USD"> + <hosts> + //Specify the PWA Host + <host>jxdemoserver3.intershop.de</host> + </hosts> + //For Multi-Site (e.g. inSPIRED-inTRONICS-Site and inSPIRED-inTRONICS_Business-Site), define a domainsplitting configuration for each site. + <site>inSPIRED-inTRONICS-Site</site> + <shortpathpattern>/${locale:(de|en)}${path}</shortpathpattern> + <server-group>WFS</server-group> + <currency>USD</currency> + <appurlid>rest</appurlid> + <replacements> + <replacement type="locale"> + <compact>de</compact> + <expand>de_DE</expand> + </replacement> + <replacement type="locale"> + <compact>en</compact> + <expand>en_US</expand> + </replacement> + </replacements> + </domainsplitting>
If the ICM was opened with the server group BOS (see URL: https://jxdemoserver6.intershop.de/INTERSHOP/web/BOS/...), use the <server-group>
tag BOS (<server-group>BOS</server-group>
) in the domain splitting configuration.
Make sure that the NGINX multi site configuration for the locale (/en, /us etc.) matches the one from domainsplittings.xml (<compact>en</compact>
, <compact>us</compact>
etc.).
nginx: ... environment: ... MULTI_CHANNEL: | .+: - baseHref: /en channel: inSPIRED-inTRONICS-Site lang: en_US
<domainsplitting name="main PWA host for en_US and USD"> ... <replacements> ... <replacement type="locale"> <compact>en</compact> <expand>en_US</expand> </replacement> </replacements> </domainsplitting>
If no URL parameter is specified for the locale, the configuration could look like this:
+ <domainsplitting name="main PWA host for en_US and USD"> + <hosts> + <host>jxdemoserver3.intershop.de</host> + </hosts> + <site>inSPIRED-inTRONICS-Site</site> + <shortpathpattern>${path}</shortpathpattern> + <server-group>WFS</server-group> + <currency>EUR</currency> + <appurlid>rest</appurlid> + </domainsplitting>
nginx: ... environment: ... MULTI_CHANNEL: | .*jxdemoserver3.intershop.de channel: inSPIRED-inTRONICS-Site lang: de_DE
To specify application-specific or domain-specific properties, create a new .properties file (e.g. url.properties) in the corresponding $IS_SHARE/system/config folder and specify the WebServerURL and WebServerSecureURL of the PWA host(s) in it:
intershop.WebServerURL=http://jxdemoserver3.intershop.de:80 intershop.WebServerSecureURL=https://jxdemoserver3.intershop.de:443
The same can be applied on a domain-specific basis.
intershop.WebServerURL=http://jxdemoserver3.intershop.de:80 intershop.WebServerSecureURL=https://jxdemoserver3.intershop.de:443
Domain-specific WebServerURLs can only be used for a single application approach (1 channel > 1 application).
The domain splitting and Web Server URL configurations require a restart of the application server.
This step can be skipped by enabling the following CheckSource properties:
intershop.urlrewrite.CheckSource=true intershop.configuration.CheckSource=true
To enable URL rewriting for the inSPIRED-inTRONICS-Site:
To set the External Base URL for the PWA application:
To generate PWA sitemap files:
Enter a name and an ID.
Note
The name of the sitemap must start with: sitemap_
This is a workaround for all versions under ICM 7.10.26.20-LTS, 7.10.32.11-LTS and 7.10.37.0, because the location of the generated sitemaps has changed with these versions.
To make the sitemaps available via REST, up to ICM 7.10.26.19-LTS, 7.10.32.10-LTS and 7.10.36.0 it is necessary to copy the generated sitemaps from:
/eserver1/share/sites/inSPIRED-inTRONICS-Site/units/inSPIRED-inTRONICS/syndication/sitemaps/sitemap_pwa
to:
/eserver1/share/sites/inSPIRED-inTRONICS-Site/1/static/en_US/sitemaps/pwa/
Once the sitemaps can be retrieved via a REST request to the ICM server, the PWA is able to get the sitemaps.
GET https://jxdemoserver3.intershop.de/en/sitemap_pwa.xml
GET https://jxdemoserver3.intershop.de/en/sitemap_pwa-product-0.xml.gz
The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.