TL;DR. I want to make bedrock-ansible’s nginx server available to devices on my local network for testing purposes, and thought that
vagrant share would be quick & convenient.
Nope. I’m also open to alternative methods for solving this problem.
Using a vanilla bedrock-ansible install plus a vanilla group_vars/development, I can’t get vagrant share working.
produces an error:
Vagrant was unable to detect an HTTP port for your machine. Your Vagrant machine is reporting that it is accessible at the address: '192.168.50.5'. Vagrant tries some common HTTP ports to try to find a listening HTTP server, but all the attempts failed. There are a few options to fix this error: 1. Turn off HTTP sharing with the `--disable-http` flag. 2. Have your HTTP server listen on port 80, 3000, 4567, 8000, or 8080. Vagrant will automatically try these. 3. Specify an HTTP port explicitly to vagrant share with the `--http` flag. 4. Make sure that the address above along with your HTTP port are accessible from this machine. Sometimes firewalls or binding to the wrong IP cause it to become inaccessible.
Trying again with:
vagrant share --http 80
gets me a bit further…
==> default: Detecting network information for machine... default: Local machine address: 192.168.50.5 default: Local HTTP port: 80 default: Local HTTPS port: disabled ==> default: Checking authentication and authorization... ==> default: Creating Vagrant Share session... default: Share will be at: XXXXX-XXXXXX-0000 ==> default: Your Vagrant Share is running! Name: XXXXX-XXXXXX-0000 ==> default: URL: http://XXXXX-XXXXXX-0000.vagrantshare.com
OK. Testing local site with
curl -IL mysite.dev:
HTTP/1.1 200 OK Server: nginx Date: Fri, 23 Jan 2015 10:19:56 GMT Content-Type: text/html; charset=UTF-8 Connection: keep-alive Vary: Accept-Encoding X-Powered-By: PHP/5.6.4-1+deb.sury.org~trusty+1 X-Pingback: http://plannabel.dev/wp/xmlrpc.php Link: <http://plannabel.dev/>; rel=shortlink X-UA-Compatible: IE=Edge
But not so good with the vagrant share URL:
HTTP/1.1 500 Internal Server Error Content-Type: text/plain; charset=utf-8 Date: Fri, 23 Jan 2015 10:23:53 GMT Connection: keep-alive
I checked srv/www/mysite.dev/logs/mysite.dev.access.log and the
vagrant share request didn’t trouble nginx at all, so perhaps its a firewall or other networking problem.
I have had a good look around the usual sources, but with no luck. My setup is Mac OS X 10.9.5, Vagrant 1.7.2, Virtualbox 4.3.20-96996, Ansible 1.8.2, connecting to local network via Airport and router is configured not to isolate wireless stations.
I would welcome your thoughts.