Tag Archives: proxy

system-wide proxying with os x (yosemite)

Perhaps you’re at a coffee shop, and want to ensure your communication is secure.

Or maybe you are out of the country, and need access to something like annualcreditreport.com.

What’s a body to do?

If you have a Mac, set up a system-wide proxy setting for a new Location, of course!

This is a very simple thing to do, but does require you have access to an SSH server somewhere.


  • Create a new Location in your Network Preferences (name it something ‘obvious’ like “Proxy” or “Untrusted”Locations
  • Remove services you don’t need (most likely you only need WiFi) Services
  • Go to Advanced -> Proxies
  • Enable SOCKS Proxy and set server to ‘localhost’ with ‘9999’ as the port proxies
  • Start a port-forwarded SSH session in Terminal :: ssh -D 9999 user@remotehost
  • Click OK in the Proxies setting window
  • Click Apply in the Network preferences panel

That’s it. You do need to remember to create the port-forwarded SSH connection, or your web browsers and such will fail to connect properly.

You can change Location easily via ->Location.

Tested on OS X Yosemite. It should work elsewhere, but I only have a 10.10 machine to work with.

reverse proxying from apache to tomcat

After much hemming and hawing, I was able to get Apache working as a reverse proxy to Tomcat today.

<VirtualHost *:80>
    ServerName domain.com
    ServerAlias www.domain.com
    ProxyPreserveHost on
    ProxyPass / http://localhost:8080/path/
    ProxyPassReverse / http://domain.com:8080/path/

That’s all you need (though you can add much more). Note the trailing slashes on the proxy paths – without them, you have no dice.