With a fresh build of 684eb478e my SCGI setup with nginx 1.5.12 on
Ubuntu Server 13.10 64bit appears to be working.

Fossil is started via upstart using:

  exec /usr/local/sbin/fossil server --localhost --scgi /srv/fossils/partner

Nice catch Joe!

http://www.mail-archive.com/fossil-users@lists.fossil-scm.org/msg15001.html

On 3/5/14, Jon <jon.for...@gmail.com> wrote:
>>> I'll tinker with scgi tomorrow, but even if I get it working, I don't
>>> yet
>>> see how scgi ensures fossil generates correct links to it's gui and
>>> route back user url's similar to
>>>
>>>     http://somewhere.mydomain.com/partner/<repo-name>/...
>>>
>>> ...SNIP...
>>>
>> I've only used nginx once, and that was to test the SCGI code of Fossil
>> when I was writing it.  I didn't have to do anything special, other than
>> setting the SCRIPT_NAME scgi_param.  The links that the GUI generates are
>> either relative, or else they are use the HTTP_HOST scgi_param, depending
>> on context.
>>
>> http://www.fossil-scm.org/fossil/doc/tip/www/server.wiki#scgi shows my
>> complete setup.  It just works.  Don't try to over-think it.
>
> Here's a summary of an scgi config that rewards me with a 502 from nginx.
>
> How do you run `fossil server` in verbose/debug mode and/or have it
> log out detailed info? Any obvious config mistakes or other debugging
> ideas?
>
>
> $ /usr/local/sbin/fossil version
> This is fossil version 1.28 [3d49f04587] 2014-01-27 17:33:44 UTC
>
> $ nginx -v
> nginx version: nginx/1.5.11
>
> # start fossil server like so (or via `exec` in an upstart script)
> $ sudo /usr/local/sbin/fossil server --scgi /srv/fossils/partner
>
> # relevant /etc/nginx/conf.d/default.conf entry
> location ~ ^/partner/ {
>     include scgi_params;
>     scgi_pass 127.0.0.1:8080;
>     scgi_param SCRIPT_NAME "/partner";
> }
>
> # fossil repos live in this structure
> # have used both `root` and `nginx` ownership; no difference wrt error
> $ ll /srv/fossils
> total 4
> drwxr-xr-x 2 root root 4096 2014-03-02 10:05:12 partner/
>
> $ ll /srv/fossils/partner
> total 88
> -rw-r--r-- 1 root root 89088 2014-03-02 10:05:12 logicalmaps.fossil
>
> # client requests get HTTP 502 errors
> curl -I http://stimpy/partner/logicalmaps/
> HTTP/1.1 502 Bad Gateway
> Server: nginx
> Date: Thu, 06 Mar 2014 01:25:08 GMT
> Content-Type: text/html
> Content-Length: 537
> Connection: keep-alive
> ETag: "5315ce33-219"
>
> # nginx error message corresponding to HTTP 502 error to client request
> $ tail -1 /var/log/nginx/errors.log
> 2014/03/05 20:57:43 [error] 2054#0: *1 upstream prematurely closed
> connection while reading response header from upstream, client:
> 10.0.2.2, server: stimpy, request: "GET /partner/logicalmaps/
> HTTP/1.1", upstream: "scgi://127.0.0.1:8080", host: "stimpy"
>
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to