Вопрос

I have installed the PWA studio successfully with the Venia storefront. But my development environment URL is generating something like below.

https://magento-venia-concept-3328z.local.pwadev:8048/

How I can change the URL to something else.

Это было полезно?

Решение

You can change the PWA development environment domain names by updating below env variables inside below path.

/var/www/pwa-studio/packages/venia-concept/.env:37

And uncomment below lines and give your domain names.

#   By default your subdomain will be detected from your package.json name.
#   Use this to override it.
#   MAGENTO_BUILDPACK_SECURE_HOST_SUBDOMAIN='custom-value'
#   This will prepend the uniquely generated domain with `custom-value`.
#
#   By default your custom host will be a subdomain of `local.pwadev`.
#   Use this to specify an entire domain, avoiding that TLD.
#   MAGENTO_BUILDPACK_SECURE_HOST_EXACT_DOMAIN='my-favorite.pizza'

Then rebuild using below commands and watch the Venia storefront on the new domain name.

npm run build
npm run watch:venia

Другие советы

@sakshi

You need to do following things to resolve the url issues:

  1. check the environment file nano packages/venia-concept/.env
  2. change MAGENTO_BACKEND_URL=http://yourdomain/ in your case it should be MAGENTO_BACKEND_URL=https://health365.local/
  3. change CUSTOM_ORIGIN_EXACT_DOMAIN=health365.local
  4. your 10000 port should open (very important) , you need to add it in .env file DEV_SERVER_PORT=10000, save the .env file.
  5. run this command to generate ssl cert for venia package yarn buildpack create-custom-origin packages/venia-concept
  6. yarn run watch:venia

enjoy !!

Лицензировано под: CC-BY-SA с атрибуция
Не связан с magento.stackexchange
scroll top