-
Notifications
You must be signed in to change notification settings - Fork 255
How to add an new host? - everytime redirect to local.dev #126
Comments
The data bags are only parsed when the Vagrant box is provisioned. You have two options:
|
Thank you :) i will try 👍 |
I tried 2 methods. but it will also redirect to local.dev. :-/ |
Not sure what is going on. Investigate the entries in sites-available that are created. |
Have you set your hosts file to point to the relevant url? |
My windows\system32\drivers\etc\hosts local.dev works |
Have you checked the vhost configuration inside the box? What is in /etc/apache2/sites-available? What's in /etc/apache2/sites-enabled? Were there any error messages when having the box provision that could point to trouble creating the vhost? If magento.dev ends up on local.dev there is nothing wrong with your hosts file, because it gets to the correct IP address. Something goed wrong on the vagrant box while mapping the domain name to the relevant vhost. |
same here. I've used vagrant-lamp for a long time but with the latest checkout it stopped working. In sites-enabled and sites-available I correctly see my vhost "9thcircle.dev", although the files have three identicalcopy of the <VirtualHost *:80> block inside (which sounds weird to me at first place) but 9thcircle.dev redirects to local.dev |
Having the same issue, did anyone overcome this? |
I have seen the duplicate blocks in the vhost configurations as well, but it hasn't caused me a lot of trouble. It could be related, though. It looks like something goes wrong generating the vhost configs from the data bags. Something else that may be foiling you is the "canonical host redirection" that was added fairly recently (and which is probably responsible for the actual redirecting to local.dev); whenever a vhost gets activated, it will check the hostname against the "canonical" host name for that vhost and redirect to it. At least it sometimes helps figuring out there is an issue with your vhosts; for some reason, you local.dev vhost gets activated and not the one you're expecting. The answer must be in the vhost definition, most likely in the one that is not working. Could you post both your local.dev and 9thcircle.dev vhost here? Are either of them altered in any way? When did you last completely destroy and recreate your vagrant box? |
$ vagrant reload --provision |
My current steps.
{
"id": "magento",
"host": "magento.dev",
"aliases": [
"www.magento.dev",
"magento.dev"
]
}
clear my dns-cache and call in my browser the new domain: magento.dev
after this - my browser redirect to local.dev (local.dev works how expected)
What i have to add in /etc/hosts ? - what is missing?
The text was updated successfully, but these errors were encountered: