Nate.Vegas

Learn PHP

Sexy URLS for Vagrant With FoxyProxy

Use Foxy Proxy to make your life easier (Mac OSX/ Linux)

If you’re like me and you don’t like seeing an ugly IP address during development, you can use FoxyProxy to easily change the http://127.0.0.1:8080 to vagrant.dev or any url of your choice.

Start off with either a Vagrant project of your own, or this basic Symfony 2 Vagrant project here: https://github.com/nater1067/Vagrant-Symfony-2 . Clone the project and follow the installation instructions. Run “vagrant up”.

Now install FoxyProxy. Firefox Users: https://addons.mozilla.org/en-US/firefox/addon/foxyproxy-standard/ Chrome Users: https://chrome.google.com/webstore/detail/foxyproxy-standard/gcknhkkoolaabfmlnjonogaaifnjlfnp?hl=en

After installing you should see a little fox somewhere on your browser. Click that fox. Make sure “Use proxies based on their pre-defined patterns and priorities” is selected.

images

Click on the new fox and select “Options”. Add a new proxy for 127.0.0.1 port 8080.

images

Then add a new url pattern. Set “symfony.dev” as the url pattern, optionally set a pattern name, make sure whitelist urls and wildcards are selected. Press save, exit foxy proxy and navigate to http://symfony.dev.

images

Comments