Site URL not completed. Bad redirection ?

Francis Daly francis at daoine.org
Sat Nov 3 10:21:55 UTC 2012


On Fri, Nov 02, 2012 at 05:50:08PM -0400, gerard breiner wrote:
> Francis Daly Wrote:
> -------------------------------------------------------
> > On Wed, Oct 31, 2012 at 07:02:55AM -0400, gerard breiner wrote:

Hi there,

> > So it redirects to /SOGo/. What happens when you do that manually?
> > 
> >   curl -k -i https://127.0.0.1/SOGo/
> 
> curl -k -i https://127.0.0.1/SOGo/ give :
> 
> -----------------------------------------------------
> HTTP/1.1 200 OK
> Server: nginx/1.2.4
> Date: Fri, 02 Nov 2012 21:09:16 GMT
> Content-Type: text/html; charset=utf-8
> Content-Length: 2613
> Connection: keep-alive

<snip>

> 	<link rel="shortcut icon" type="image/x-icon"
> href="https://sogo.mydomain/SOGo/WebServerResources/favicon.ico" />

So: sogo has been configured with its name, and doesn't just use the Host:
header it receives.

> 	<link rel="stylesheet" type="text/css"
> href="/SOGo.woa/WebServerResources/generic.css?lm=1351533524" />

And sometimes it uses /SOGo/, and sometimes /SOGO.woa/. From this limited
sample, ".woa" includes ?lm=NNN on the end of the url.

> 	  <p>We've detected that your browser version is currently not supported on
> this site. Our recommendation is to use Firefox. Click on the link below to
> download the most current version of this browser.</p>

And it does browser sniffing.

You can try

  curl -k -i -A 'Mozilla/5' https://127.0.0.1/SOGo/

to see if you can get at the actual content that your browser gets; or
when you just use your browser, you can try to "view page source". The
aim is to find why and where the problem arises.

But: it turns out that that probably isn't necessary here:

> 	  <p class="browser"><a href="http://www.getfirefox.com/">Download
> Firefox</a> <img
> src="/SOGoSOGo.woa/WebServerResources/browser_firefox.gif?lm=1351283693"
> alt="*" /></p>

/SOGoSOGo.woa/ appears in there. So it looks like even this page shows
a problem.

What do you see here when you go direct to sogo?

  curl -k -i https://127.0.0.1:20000/SOGo/

Does it have /SOGoSOGo in it?

What do you get for the following:

  curl -k -I https://127.0.0.1/SOGoSOGo.woa/WebServerResources/browser_firefox.gif?lm=1351283693
  curl -k -I https://127.0.0.1/SOGo.woa/WebServerResources/browser_firefox.gif?lm=1351283693
  curl -k -I https://127.0.0.1/SOGo/WebServerResources/browser_firefox.gif?lm=1351283693

(-I makes a HEAD request, so you should just see the http response headers.)

> > > [31/Oct/2012:11:44:05 GMT] "POST /SOGoSOGoSOGo/connect HTTP/1.0" 200
> > 27/62
> > > 0.016 - - 4K
> > > 
> > > I think the "POST /SOGoSOGoSOGo/" is wrong ... 
> > 
> > Can you see where that request came from? Probably it was the "action"
> > of a html form within the response of a previous request. Maybe that
> > will help show why SOGo is repeated here.
> 
> Before login there is GET /SOGoSOGo 
> After login there is POST /SOGoSOGoSOGo/ 

It looks like some part of the system is breaking this. I can't tell
whether it is sogo itself, or nginx in front of it.

> > The SOGo installation guide mentions an apache config file, and says
> > "The default configuration will use mod_proxy and mod_headers to relay
> > requests to the sogod parent process. This is suitable for small to
> > medium deployments.".
> > 
> Make me puzzle ... For instance , templates will not be loaded without this 
> :
>  location /SOGo.woa/WebServerResources/ {
>                          alias /usr/lib/GNUstep/SOGo/WebServerResources/;
>                  }

That means that these requests are served by nginx from your filesystem.

Are templates involved in the login problem, or the /SOGoSOGo problem
you report?

> I 'm going to get a look at internet for getting a sogo configuration file
> for nginx.
> Yet my configuration come from internet and as it didn't work I tried this
> and that and this and passed too much time working on this issue. If I
> managed to get it work I'll come back here for sharing.

If you want to keep trying, I would suggest keeping your configuration
as simple as possible, and only trying one thing at a time.

Find out what exact requests must be made of the sogo server directly,
and then configure nginx to produce them.

I suspect that you will want something like

  location ^~ /SOGo/ {
    proxy_pass http://127.0.0.1:20000;
  }

If you have just that, and you do

  curl -i -k https://127.0.0.1/SOGo/

do you get a useful response, and does it refer to /SOGoSOGo ?

Based on that response, you can build the rest of the config.

> Thank you indeed Francis for your time and the quality of yours answers.

You're welcome. Good luck with it,

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list