sloecode-dev team mailing list archive
-
sloecode-dev team
-
Mailing list archive
-
Message #00061
Re: error when trying my first push or branch
-
To:
sloecode-dev@xxxxxxxxxxxxxxxxxxx
-
From:
"Guy K. Kloss" <guy.kloss@xxxxxxxxx>
-
Date:
Tue, 10 Jan 2012 10:54:14 +1300
-
In-reply-to:
<CAN2KdQ81q2xmqPeqdVc=Ye4isf-oMZg6Cc93WZfH3097XQZ_bQ@mail.gmail.com>
-
User-agent:
Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111124 Thunderbird/8.0
On 09/01/12 20:19, Thomi Richards wrote:
> Anyway, I have altered the Python snippet from your mail to point at a
> different server:
>
> >>> s = xmlrpclib.Server('http://localhost/sc/xmlrpc')
> >>> s.getKeysForUser('admin')
> {'admin': []}
>
> And bang, it seems to work!!!
>
> Great - sorry for forgetting to alter the snippet!
Just figured out that this was working through the reverse proxy. Still,
a step in the right direction.
> This seems to me as if we need to take at least one of these actions:
>
> * Add a reverse proxy rule to my Apache mod_wsgi configuration to fix
> the /xmlrpc/ rooting requests to /sc/xmlrpc/
>
> I don't understand why you need this (although I've never attempted to
> run sloecode behind a reverse proxy). The XMLRPC endpoint the smart
> server uses is configurable in the .ini file - why not just point it at
> the correct URL? Nothing outside the smart server needs access to that
> service.
Well, to not have to fiddle with URL rewriting in *content*, the reverse
proxy only redirects the requests. To accomplish that, all WSGI content
of the Sloecode site is prefixed with a path fragment "/sc" in my
deployment. This configuration is purely located in the mod_wsgi
configuration (sites-available or sites-enabled respectively in
Debian/Ubuntu setups). The Sloecode instance handles all that in itself
properly. As the XML-RPC is served through the same WSGI instance, it
also needs to use that altered path. So I must also tell the
production.ini of this change as well.
> * Enhance the URL mapping capabilities inside Sloecode so that the
> *Python* code (not just the HTML templates and CSS) will work cleanly
> with different deployment scenarios.
>
> This should work, although perhaps with a bit of configuration tweaking.
> The reverse proxy thing may be an issue, but it's well supported by
> pylons, so it should be a reasonably simple matter to get it going.
Doesn't seem necessary. See below.
> * Reconfigure the xmlrpc_auth_endpoint in production.ini
>
> Yes, see above.
>
> I've tried *just* the last one, but it doesn't seem sufficient.
>
> How so? You're still having problems?
Yes, as the web site deployment is purely governed by the WSGI
configuration in the Apache web server, I completely forgot that other
parts are relying on the production.ini configuration file. So, bringing
production.ini in sync with the WSGI deployed configuration then worked
like a charm. Also, by pointing the production.ini stuff at the
*internal* Sloecode port (8001), rather than the reverse proxied
external port (80) has eliminated now one level of redirection, and the
XML-RPC now "hits" the Sloecode server directly.
I'm pushing something onto Sloecode for a test right now, and it's
worked. Yaaaay!
Guy
--
Guy K. Kloss
School of Computing + Mathematical Sciences
Auckland University of Technology
Private Bag 92006, Auckland 1142
phone: +64 9 921 9999 ext. 5032
eMail: Guy.Kloss@xxxxxxxxx
References