Now when I go to https://localhost:9002/
it opens hac (hybris admin console).
When I go to https://powertools.local:9002/nystorefront/powertools/en/USD/cart
I can reach my storefront.
I want to reach mystore
when I go to localhost:9002
.
What should I do?
You have to configure webroot and storefrontContextRoot in local.properties file.
1) Add properties to your config/local.properties, change mystorefront
(mystorefront.webroot) with your storefront name. Also, need to change hac webroot to /hac
hac.webroot=/hac
mystorefront.webroot=
storefrontContextRoot=
2) To open your site without passing query parameter(?site=mysite), run the below Impex. Change mysite
with your CMSSite name. This will also resolve your error(Cannot find CMSSite associated with current URL).
$siteUid=mysite
# CMS Site
INSERT_UPDATE CMSSite ; uid[unique=true] ; urlPatterns ;
; $siteUid ; (?i)^https?://[^/]+(/[^?]*)?\?(.*\&)?(site=$siteUid)(|\&.*)$,(?i)^https?://$siteUid\.[^/]+(|/.*|\?.*)$,(?i)^https?://[^/].*$ ;