Ответы пользователя по тегу Vagrant
  • Как получить доступ к сайту из общественной сети?

    @misterobot404 Автор вопроса
    Проблему решил, причина была в том, что vagrant пробрасывал порты во внутренюю сеть, но из за того что по внешнему адресу сайт был доступен из внутренней сети не обратил на это внимание. Изменить это можно так:

    You can easily access your Vagrant from any machine on your network, by simply ensuring that the port forwarding rules aren't bound to your localhost (127.0.0.1).

    If you're using VirtualBox as your provider, you can change this on the fly, so you can have it be private by default (which is of course more secure), and then you can go change it in VirtualBox while your VM is running to expose the port to other machines on your network (and possibly the internet, so be careful!)

    To expose the port:
    Start Virtual Box
    Select your VM in the left hand side bar
    Click Settings | Network | Advanced | Port Forwarding
    Find the port you want to expose in the port list
    Set it's Host IP to an empty string, and click OK.
    The port is now available to other machines on your network, and possibly the internet, so don't do this unless you're positive you're ok with opening up the port!

    Of course to revert it, just do the same process and set the Host IP to 127.0.0.1 again.
    Ответ написан
    Комментировать