shopwareArchive / shopware-platform-vagrant

DEPRECATED: A Vagrant setup ready for shopware platform development
22 stars 14 forks source link

Frontend error domain mapping #12

Closed maqavelli closed 4 years ago

maqavelli commented 4 years ago

Error appears after vagrant installation on the frontend because of wrong domain mapping in the sales channel.

The solution is to update the sales_channel_domain table in the database and the url to the local domain name instead of using the ip address.

flohessling commented 4 years ago

Hey kev-c89,

thank you for your contribution! The sales_channel_domain is being set by the ansible provisioning. It depends on the proxy settings in ansible/vars/all.yml.

The .psh.yaml.override file has an APP_URL entry which is applied to the sales_channel_domain table by .psh.phar install.

In ansible/roles/shopware-dev/tasks/main.yml the .psh.yaml.override template is being applied and ansible inserts the ip-address of the vagrant setup or the hostname defined in ansible/vars/all.yml if proxy_enabled: yes is set.

If you are using the hostname it has to be mapped to the ip-address of the vagrant box either by adding it to your /etc/hosts (or equivalent Windows-hosts-file) or by the vagrant-hostupdater-plugin.

Depending on your settings you can access the frontend via ip-address or hostname.

I hope this helps to better understand and use the config of this setup!