Comments (11)
The data bags are only parsed when the Vagrant box is provisioned. You have two options:
- Destroy the box and re-provision (or use the --provision flag when reloading, but I'm not sure whether that will actually work)
- Manually add a site in /etc/apache/sites-available and enable it with a2enmod (leave your databas json for the next time you want to recreate your box). That's not as daunting as it sounds, just copy an existing file and modify it. Take note that at least te version I am using duplicates the information in the vhost file. You can safely delete the duplicate stuff.
from vagrant-lamp.
Thank you :) i will try 👍
from vagrant-lamp.
I tried 2 methods.
Try 1 - $ vagrant reload --provision
Try 2 - destroy the box and vagrant up again ...
but it will also redirect to local.dev. :-/
from vagrant-lamp.
Not sure what is going on. Investigate the entries in sites-available that are created.
from vagrant-lamp.
Have you set your hosts file to point to the relevant url?
currently my /etc/hosts file has the following records, which all work as necessary:
192.168.33.10 local.dev
192.168.33.10 dev.magento1.9.1.1.local
from vagrant-lamp.
My windows\system32\drivers\etc\hosts
192.168.33.10 local.dev
192.168.33.10 magento.dev
local.dev works
but magento.dev not .. it redirect to local.dev
from vagrant-lamp.
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.
from vagrant-lamp.
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
from vagrant-lamp.
Having the same issue, did anyone overcome this?
from vagrant-lamp.
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?
from vagrant-lamp.
$ vagrant reload --provision
Worked! Thanks
from vagrant-lamp.
Related Issues (20)
- Forward hkp port 11371 for downloading percona repository keys in Ubuntu
- MySQL server instance changed after vagrant reload HOT 2
- Vagrant up failed! HOT 2
- Update npm modules installation
- How to use SSL
- connect to mysql via SQLYog HOT 2
- Error: Missing required value for `chef.nodes_path'. HOT 4
- local.dev wont appear on my machine. HOT 3
- Windows10 x64 'vagrant up' error HOT 5
- Add support for vagrant-hostsupdater HOT 1
- `chmod` silently fails inside VM HOT 4
- win10 virtual5.1 vagrant1.9.3
- Error with Git on vagrant up HOT 3
- Error on vagrant up: Receipe Compile Error HOT 1
- Enable innodb_file_per_table
- Use new syntax for memory/cpu customization
- vagrant up fails
- .dev TLD Not working anymore HOT 1
- reload Provision fails due to poise HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vagrant-lamp.