This is how I set up a fairly simple local googleapis mirror using nginx and /etc/hosts. It works for most types of requests. I snagged the full list of files and their directories from Ryan McGeary's awesome ruby based googleapis-mirror which is at, https://github.com/rmm5t/googleapis-mirror . I didn't want to run an extra webserver since I already had nginx running or I would've just used it. Grab your libraries.txt updates from there. So, basically I just used the file libraries.txt with wget like, $ wget -x -i libraries.txt That'll keep the full paths. After that move the ajax subdirectory to someplace. Now go into ./ajax/libs/. There's a list of softlinks you need to make in order to fullfill stupid GET requests like, GET /ajax/libs/jquery/1.4/jquery.min.js?ver=3.4.2 See how it calls for 1.4, but in the dir stucture there is only, /ajax/libs/jquery/1.4.0/ So correct it by hand using the list below. You can throw it into a bash script or whatever if you trust me. cd ajax/ cd libs/ cd jquery ln -s 1.4.0/ 1.4 ln -s 1.3.0/ 1.3 ln -s 1.8.0/ 1.8 ln -s 1.7.0/ 1.7 ln -s 1.6.0/ 1.6 ln -s 1.5.0/ 1.5 cd .. cd webfont/ ln -s 1.0.0/ 1.0 cd .. cd mootools/ ln -s 1.3.0/ 1.3 ln -s 1.4.0/ 1.4 cd .. cd jqueryui/ ln -s 1.6.0/ 1.6 ln -s 1.7.0/ 1.7 ln -s 1.8.0/ 1.8 ln -s 1.9.0/ 1.9 cd .. cd ext-core/ ln -s 3.0.0/ 3.0 ln -s 3.0.0/ 3 cd .. cd dojo/ ln -s 1.2.0/ 1.2 ln -s 1.3.0/ 1.3 ln -s 1.4.0/ 1.4 ln -s 1.5.0/ 1.5 ln -s 1.6.0/ 1.6 ln -s 1.7.0/ 1.7 ln -s 1.8.0/ 1.8 ln -s 1.5.0/ 1.5 cd .. cd chrome-frame/ ln -s 1.0.0/ 1.0 ln -s 1.0.0/ 1 If that's all done now's the time to setup the nginx location. I did it like, location /ajax { alias /home/superkuh/app_installs/googleapis-mirror/ajax; } Now all that's left is to set up the /etc/hosts file so that ajax.googleapis.com resolves to 127.0.0.1 # Google 127.0.0.1 ajax.googleapis.com Reload your nginx config if you haven't (sudo /etc/init.d/nginx reload for me). If all went well you have regular pages making requests to localhost for the javascript libraries hosted on ajax.googleapis.com . No more third party tracking and it's faster too. To see if it's working and diagnose potential problems I just watch the tail of the nginx logs. watch -n 2 'tail -n 12 /var/log/nginx/access.log'