A
A
Alexander Bizikov2015-10-17 11:56:03
WordPress
Alexander Bizikov, 2015-10-17 11:56:03

How to set up browser-sync in Vagrant + VVV?

Good afternoon. Deployed Vagrant with VVV ( Varying-Vagrant-Vagrants )
to work with WordPress sites . I also installed the VV site creation wizard . For example, I have a WordPress site test.dev . I can open it through a browser on a computer (OS X Mavericks). Now I want to set it up so that this site can be opened on a tablet and smartphone that are connected to the same WiFi network as the computer. I was advised to use browser-sync . Performed the installation on a Vagrant virtual machine. Run browser-sync with the command:

browser-sync start --proxy "test.dev" --files "css/*.c

Result:
----------------------------------
       Local: http://localhost:3000
    External: http://10.0.2.15:3000
 ----------------------------------
          UI: http://localhost:3001
 UI External: http://10.0.2.15:3001
 ----------------------------------

These addresses do not open in a computer browser, and accordingly they do not open on a smartphone either. Found the answer
on StackOverflow : test.dev:3000 - opens in the computer's browser with the message: "Connected to BrowserSync". But on a smartphone or tablet, such an address is still not available. Tell me how to properly configure the ability to open sites locally on other devices connected to the same WiFi, preferably inside Vagrant.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
OnYourLips, 2015-10-18
@OnYourLips

Tell me how to properly configure the ability to open sites locally on other devices connected to the same WiFi, preferably inside Vagrant.

Why don't you like regular port-forwarding?
config.vm.network "forwarded_port", guest: 80, host: 8824
after that, the site you need will be on the host computer on this port, from a mobile phone it is worth contacting.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question