<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>cookie based reverse proxy?</title>
<description>hello,

i'm currently using lighty as &amp;quot;reverse proxy&amp;quot; for delegating requests to a special host based on a cookie value. this can be done with lighty using this configuration:

...
$HTTP[&amp;quot;cookie&amp;quot;] =~ &amp;quot;(; )?devredirect=aurora&amp;quot; {
proxy.server = (
&amp;quot;&amp;quot; =&amp;gt; ((&amp;quot;host&amp;quot; =&amp;gt; &amp;quot;10.0.0.20&amp;quot;, &amp;quot;port&amp;quot; =&amp;gt; 8080))
)
}
$HTTP[&amp;quot;cookie&amp;quot;] =~ &amp;quot;(; )?devredirect=...&amp;quot; {
proxy.server = (
&amp;quot;&amp;quot; =&amp;gt; ((&amp;quot;host&amp;quot; =&amp;gt; &amp;quot;10.0.0.22&amp;quot;, &amp;quot;port&amp;quot; =&amp;gt; 8080))
)
}
...

the problem with lighty is, that mod_proxy does not currently support SSL (at least not the 1.4.x branch). now i'm looking for some other solution and would like to ask if it's possible to do such with nginx?

thanks!</description><link>http://forum.nginx.org/read.php?11,1259,1259#msg-1259</link><lastBuildDate>Thu, 20 Jun 2013 08:36:23 -0400</lastBuildDate>
<generator>Phorum 5.2.16</generator>
<item>
<guid>http://forum.nginx.org/read.php?11,1259,1464#msg-1464</guid>
<title>Re: cookie based reverse proxy?</title><link>http://forum.nginx.org/read.php?11,1259,1464#msg-1464</link><description><![CDATA[i figured it out myself -- it can be done and it's pretty easy!<br /><br />[code]<br />server {<br />listen 443;<br />server_name ....devcenter.int;<br /><br />ssl on;<br />ssl_certificate /etc/nginx/....crt;<br />ssl_certificate_key /etc/nginx/....key;<br /><br />proxy_redirect off;<br />proxy_set_header Host $host;<br />proxy_set_header X-Real-IP $remote_addr;<br />proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br /><br />location / {<br />if ($http_cookie ~* &quot;(; )?devredirect=aurora&quot;) {<br />proxy_pass https://10.0.0.20;<br />break;<br />}<br />if ($http_cookie ~* &quot;(; )?devredirect=...&quot;) {<br />proxy_pass https://10.0.0.22;<br />break;<br />}<br /><br />...<br />}<br />}<br />[/code]]]></description>
<dc:creator>aurora</dc:creator>
<category>How to...</category><pubDate>Mon, 27 Apr 2009 11:31:20 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,1259,1259#msg-1259</guid>
<title>cookie based reverse proxy?</title><link>http://forum.nginx.org/read.php?11,1259,1259#msg-1259</link><description><![CDATA[hello,<br /><br />i'm currently using lighty as &quot;reverse proxy&quot; for delegating requests to a special host based on a cookie value. this can be done with lighty using this configuration:<br /><br />...<br />$HTTP[&quot;cookie&quot;] =~ &quot;(; )?devredirect=aurora&quot; {<br />proxy.server = (<br />&quot;&quot; =&gt; ((&quot;host&quot; =&gt; &quot;10.0.0.20&quot;, &quot;port&quot; =&gt; 8080))<br />)<br />}<br />$HTTP[&quot;cookie&quot;] =~ &quot;(; )?devredirect=...&quot; {<br />proxy.server = (<br />&quot;&quot; =&gt; ((&quot;host&quot; =&gt; &quot;10.0.0.22&quot;, &quot;port&quot; =&gt; 8080))<br />)<br />}<br />...<br /><br />the problem with lighty is, that mod_proxy does not currently support SSL (at least not the 1.4.x branch). now i'm looking for some other solution and would like to ask if it's possible to do such with nginx?<br /><br />thanks!]]></description>
<dc:creator>aurora</dc:creator>
<category>How to...</category><pubDate>Tue, 21 Apr 2009 07:53:35 -0400</pubDate></item>
</channel>
</rss>