figment88 Posted June 27, 2007 Report Share Posted June 27, 2007 There is a great tutorial on using Uniform Server on a removable USB drive in the UniCenterhttp://center.uniformserver.com/virtual_ho...host_pac_4.html This is great -- I setup a Subversion repository on my office harddrive and checkout to my USB memory stick. Now I have my full development environment wherever I go. I wanted to add an extra tip on top of the UniCenter tutorial. The tutorial shows you how to setup a proxy file so you can have name based virtual hosts without modifying the current computer's HOST file. The examples in the tutorial require you to modify your proxy file (*.pac) to add a line for every new virtual host. In addition, the examples use wildcard matching, so if you name your local site "example" and the real site is "example.com" the browser might not let you load both. I made a simple proxy file that solves both these issues function FindProxyForURL(url, host) { if(isPlainHostName(host)) return "PROXY 127.0.0.1"; return "DIRECT"; } The isPlainHostName looks for hosts that have a dot. So, I always name my local version of a website as a single word; e.g, site1 is site1.comsite2 is site2.com Quote Link to comment Share on other sites More sharing options...
olajideolaolorun Posted June 27, 2007 Report Share Posted June 27, 2007 Thanks... i will let Ric know Quote Best Regards Olajide Olaolorun The Uniform Server Development Team Link to comment Share on other sites More sharing options...
Ric Posted June 27, 2007 Report Share Posted June 27, 2007 Hi figment88Thanks for the feedback, well looks as if you spotted one of my many mistakes. For your sins take a look at this page just published: http://center.uniformserver.com/virtual_ho...host_pac_2.html I liked your solution so please forgive me for reproducing it. All the bestRic Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.