Right, well, replying to myself ... and hoping someone else will jump
in, here's where I'm upto ...

Having read around a bit, I figured that the reverse proxy my well be
losing the original IP address, so I looked into configuring
"SetRemoteAddrFromForwardedFor" (http://code.djangoproject.com/browser/
django/trunk/django/middleware/http.py?rev=11000#L33). Whilst this
certainly helped retain the original IP address (I setup reporting to
apache_error.log via my .wsgi file), what became clear is that it's
not the IP address that's the problem, it's the *port*.

So, I try logging in via http://127.0.0.1:81/admin/ and end up being
redirected to http://127.0.0.1/admin/ (port 81 is managed and served
via nginx).
However, if I login to admin via my apache port, 127.0.0.1:96 I don't
suffer in this way ....

So, any thoughts anyone?

On a slightly separate note - forgetting the reverse proxy arrangment
for a moment, how would one serve admin on a separate port?

Thanks for any help,
R




On Oct 21, 10:25 pm, rd-london <roland.d...@gmail.com> wrote:
> Hi,
> Wonder if someone can help.This issue is all with a local dev
> situation, so this isn't live.
>
> I have nginx running on port 81 e.g.http://127.0.0.1:81/and serving
> static media - which in turn proxies through to Apache running on port
> 96. All works fine (apart from the issue I outline below) - so I can
> browse my content no problem.
>
> The issues relate to the admin interface.
>
> If I request the admin interface athttp://127.0.0.1:81/admin/, the
> admin login window appears but on "log in", I am taken to  
> http://127.0.0.1/admin/
> - which of course 404's i.e. doesn't work (there appears to be some
> kind of redirect going on).
>
> Once I've got this 404, if I then requesthttp://127.0.0.1:81/admin/
> again, the full "logged in" interface now comes up - i.e. I am now
> *not* redirected and am now logged in.
>
> Carrying on ... if I try to edit some content, all works fine until I
> try to Save or Save and Continue ... at which point again I am
> redirected to admin URL minus the port (incidentally the item is then
> saved).
>
> If I work directly on the Apache interface athttp://127.0.0.1:96/I
> don't have this problem.
>
> Anyone any suggestions as to what's going on and how to fix it?
>
> Many thanks,
> R
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to