<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr - alexwilliams</title>
<link>http://snipplr.com/users/alexwilliams</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Fri, 24 May 2013 13:02:58 GMT</pubDate>
<item>
<title>(Apache) HAProxy URL Rewriting with query strings (ugly URLs)</title>
<link>http://snipplr.com/view/18404/haproxy-url-rewriting-with-query-strings-ugly-urls/</link>
<description><![CDATA[ <p>This line can be added to 'backend', 'frontend', 'listen' directives in the HAProxy config.

It will redirect all requests for /books/mysql to /books.php?title=mysql</p> ]]></description>
<pubDate>Mon, 17 Aug 2009 15:08:34 GMT</pubDate>
<guid>http://snipplr.com/view/18404/haproxy-url-rewriting-with-query-strings-ugly-urls/</guid>
</item>
<item>
<title>(Apache) HAProxy URL Rewriting</title>
<link>http://snipplr.com/view/18274/haproxy-url-rewriting/</link>
<description><![CDATA[ <p>In this example:

*rewrite urls from domain.com to www.domain.com*

This is somewhat documented elsewhere, but not very well, so here's an example on how to perform simple URL rewriting with HAProxy (instead of using mod_rewrite with apache).

This works great if your servers use lighttpd, nginx, or anything that doesnt provide its own simple url rewriting.</p> ]]></description>
<pubDate>Thu, 13 Aug 2009 14:10:49 GMT</pubDate>
<guid>http://snipplr.com/view/18274/haproxy-url-rewriting/</guid>
</item>
<item>
<title>(Apache) HAProxy database load-balancing and redundancy</title>
<link>http://snipplr.com/view/18033/haproxy-database-loadbalancing-and-redundancy/</link>
<description><![CDATA[ <p>_This hasn't been tested in production yet. Use at your own risk_

The read cluster contains 7 servers which can accept *READ* requests, but not all at once (see Failure Scenarios).

The write cluster contains 4 servers which can accept *WRITE* requests (only 1 at a time though, *don't be stupid*).

Port 9201 is an HTTP service which checks if replication is running fine (SlaveIO yes, SlaveSQL yes, SecondsBehindMaster 0).

Port 9200 is an HTTP service which checks if mysql is running fine (results appear after performing 'show databases').

In both cases (ports 9200 and 9201), a simple shell script is installed on each server which then runs as a STREAM daemon through xinetd) and outputs a "200 OK" or "503 Service Unavailable".</p> ]]></description>
<pubDate>Fri, 07 Aug 2009 13:55:46 GMT</pubDate>
<guid>http://snipplr.com/view/18033/haproxy-database-loadbalancing-and-redundancy/</guid>
</item>
<item>
<title>(Other) Haproxy load-balanced web cluster with different backends through acl's</title>
<link>http://snipplr.com/view/17507/haproxy-loadbalanced-web-cluster-with-different-backends-through-acls/</link>
<description><![CDATA[ <p>How to send load-balanced requests to a web cluster and split the requests to different server pools based on specific ACL rules.

This configuration sends files ending with .php to a pool of "dynamic" web servers (running Apache).

It sends all other files (.js, .jpg, .css, .html) to a pool of "static" web servers (running Lighttpd).</p> ]]></description>
<pubDate>Mon, 27 Jul 2009 11:08:44 GMT</pubDate>
<guid>http://snipplr.com/view/17507/haproxy-loadbalanced-web-cluster-with-different-backends-through-acls/</guid>
</item>
<item>
<title>(Ruby) Formatting a date with or without the time</title>
<link>http://snipplr.com/view/1911/formatting-a-date-with-or-without-the-time/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 01 Jan 2007 11:07:45 GMT</pubDate>
<guid>http://snipplr.com/view/1911/formatting-a-date-with-or-without-the-time/</guid>
</item>
<item>
<title>(SQL) HABTM relationship MySQL tables for use in Rails</title>
<link>http://snipplr.com/view/1910/habtm-relationship-mysql-tables-for-use-in-rails/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 01 Jan 2007 11:07:44 GMT</pubDate>
<guid>http://snipplr.com/view/1910/habtm-relationship-mysql-tables-for-use-in-rails/</guid>
</item>
<item>
<title>(JavaScript) JavaScript automagically hide and show an HTML tag (DIV, P, whatever)</title>
<link>http://snipplr.com/view/1909/javascript-automagically-hide-and-show-an-html-tag-div-p-whatever/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 01 Jan 2007 11:07:43 GMT</pubDate>
<guid>http://snipplr.com/view/1909/javascript-automagically-hide-and-show-an-html-tag-div-p-whatever/</guid>
</item>
<item>
<title>(CSS) Center HTML content horizontally using CSS</title>
<link>http://snipplr.com/view/1907/center-html-content-horizontally-using-css/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 01 Jan 2007 11:07:42 GMT</pubDate>
<guid>http://snipplr.com/view/1907/center-html-content-horizontally-using-css/</guid>
</item>
<item>
<title>(PHP) Load a PHP Class automatically upon instantiation (PHP5)</title>
<link>http://snipplr.com/view/1908/load-a-php-class-automatically-upon-instantiation-php5/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 01 Jan 2007 11:07:42 GMT</pubDate>
<guid>http://snipplr.com/view/1908/load-a-php-class-automatically-upon-instantiation-php5/</guid>
</item>
<item>
<title>(Ruby) Clone dev DB schema to test DB in Rails</title>
<link>http://snipplr.com/view/1906/clone-dev-db-schema-to-test-db-in-rails/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 01 Jan 2007 11:07:41 GMT</pubDate>
<guid>http://snipplr.com/view/1906/clone-dev-db-schema-to-test-db-in-rails/</guid>
</item>
<item>
<title>(PHP) PHP: Connecting Flash to a Database (remoting)</title>
<link>http://snipplr.com/view/1905/php-connecting-flash-to-a-database-remoting/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 01 Jan 2007 11:07:39 GMT</pubDate>
<guid>http://snipplr.com/view/1905/php-connecting-flash-to-a-database-remoting/</guid>
</item>
</channel>
</rss>