SVN and Squid

We run a number of servers behind the scenes; Version Control (SVN), Trac, ColdFusion (dev and staging), Database (SQL Server, MySQL, PostgreSQL) ...

We've now deployed a proxy server in front of it all. In this case we've deployed Squid to act as a reverse proxy.

So, basically everything now goes through the Squid server, and it routes our requests based on the domain name requested.

It was all fairly straight forward to set up, except we encounted a slight problem when it came to committing changes back into SVN.

svn: Commit failed (details follow):
svn: MKACTIVITY of '/path/to/svn/repo/!svn/act/20b34b89-e624-0410-bfb9-b7cf8f28e335': 400 Bad Request (http://mydomain.com)

For the life of me I couldn't figure out what was going on. As well as the introduction of Squid, we had also upgraded SVN and Trac and I assumed it was the SVN upgrade that was causing the issue.

As it turns out, it was Squid. You have to make a slight change when you're using a proxy with SVN.

As they say, Read the F*%king Manual!!! http://subversion.tigris.org/faq.html#proxy

Comments

Simon whittaker's Gravatar Just out of interest, what benefit do you get from using a reverse proxy in front of the internal systems like this? I can understand in front of external systems but am just interested in the reasoning.
# Posted By Simon whittaker | 06/02/08 20:40

Andy Allan's Gravatar 1) Security. We don't folks to have direct access to the internal systems. Our clients use the Trac system, and some have access to SVN.
1.1) It's a single point of access, and that's all we need to secure (OK we secure other things, but hopefully you get the point).
2) Distribute Load
3) URL rewriting. I can have requests going to different servers behind the scenes based on URLs, and you don't need to know or care about it.
3.1) Different applications running on different OS/Hardware
4) Management. I can change servers, DNS, etc behind the scenes. The "outside client", albeit us, don't get affected by changes.

I'm sure others can jump in with more ....
# Posted By Andy Allan | 06/02/08 21:50

Scotch on the Rocks 2008