nginx + fossil configuration problem

Francis Daly francis at
Wed Nov 21 18:53:55 UTC 2012

On Wed, Nov 21, 2012 at 07:16:41PM +0100, Monthadar Al Jaberi wrote:

Hi there,

> So I want localhost/fossil/aaa.
> I moved the working location block inside the default server block:

> 	location /fossil/ {
>             proxy_pass http://localhost:8080/;

> 	}

> Now all my other cases work except the fossil one.
> When I browse to localhost/fossil/aaa I see that the link changes to:
>  http://localhost//aaa/index
> An extra '/' is added somehow. The page I get is from nginx 404, which
> I suppose means nginx did not proxy the request??

No, nginx sent the request to fossil, which responded with a http redirect
to this url. Then your browser asks nginx for //aaa/index, which does
not exist as a file in the right place, hence 404.

  curl -i http://localhost/fossil/aaa

to see exactly what comes back.

What you (probably) want is for that redirect to be to /fossil/aaa/index,
which is (ideally) down to the fossil configuration.

Newer versions of fossil tend to handle things a bit better; possibly
setting baseurl to http://localhost/fossil (or maybe just /fossil)
when you start the fossil service will allow things to work for you.

Good luck with it,

Francis Daly        francis at

More information about the nginx mailing list