Nick Rothwell | 14 Aug 13:19 2005

Proxy cookies broken in 1.0...?

I'm messing around with 1.0b2 and having problems with login (which I
guess is a cookie issue). If I connect to the instance directly (port
8668) then everything works fine, but if I connect via an Apache
proxy, the login only succeeds for the following page, and is then
dropped.

I've just tested again with 0.5.2a and the problem doesn't arise there.

I'm using the Apache rewrite module. Here's a chunk of my httpd.conf:

<VirtualHost 66.199.228.111>
    ServerName wiki.cassiel.com
    ....
    RewriteRule ^/((space|comments|theme|exec)/.*) http://127.0.0.1:8668/cassiel-wiki/$1 [P]
</VirtualHost>

Is there an obvious reason why login would break, when proxied,
between 0.5.2a and 1.0b2?

	-- N.

--

-- 

  nick rothwell -- composition, systems, performance -- http://www.cassiel.com
Nick Rothwell | 18 Aug 11:46 2005

Proxy cookie issue - fixed...

A quick follow-up to the problems I was having with proxied SnipSnaps
not preserving logins... Turns out it was just pilot error. For some
daft reason, I'd been saying

	http://<server>:8668/install?expert=true

for each "instance", setting the application prefix each time. This
was giving me several complete webapps. The application prefix meant
that each one would get the cookie path for logins right with a direct
connection to <server>:8668, but not when proxied through Apache.

The correct action, of course, is

	http://<server>:8668/admin/configure?prefix=/xxxx

which creates a new instance inside an existing webapp, and sets up
prefix which works correctly via proxying.

The real giveaway was the diagnostics given out by SnipSnap when it
starts up: one gets to see each webapp in turn, and all the SnipSnap
instances (and prefixes) per webapp.

Thanks to Leo for spending time looking into this with me...

	-- N.

--

-- 

  nick rothwell -- composition, systems, performance -- http://www.cassiel.com
(Continue reading)


Gmane