Created
April 14, 2014 18:20
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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