Skip to content

Instantly share code, notes, and snippets.

@dhargitai
Created April 14, 2014 18:20
Show Gist options
  • Save dhargitai/10671254 to your computer and use it in GitHub Desktop.
Save dhargitai/10671254 to your computer and use it in GitHub Desktop.
Describe how you can forwarding with Proxylocal to view sites in Vagrant virtual machine
$ gem install proxylocal
# Into Vagrantfile:
# config.vm.network "forwarded_port", guest: 80, host: 8080
$ vagrant reload
# In new terminal window:
$ proxylocal 8080
# You can copy the forwarded URL from the output. The forwarding lives until you terminate the process.
# You need to replace the base URL to the forwarded one. For example if you using Magento:
$ vagrant ssh
$ mysql -uroot -proot magentodb -A
> UPDATE core_config_data SET value = REPLACE(value, '<YOUR-CURRENT-BASE-URL>', '<COPIED-PROXYLOCAL-URL>') WHERE path LIKE 'web/%';
# Flush the config cache and get busy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment