This are a special case, gogs works better and lighttpd 
only works with gitea <= 1.6, check https://redmine.lighttpd.net/issues/2880

The gitea needs lighttpd to map the url-path:

> Either Gitea should work without the url mapping, 
> or it should work with the url mapping.

Gitea needs request url mapping in one direction, 
but requires that lighttpd skip the reverse mapping in Set-Cookie path=... 
in the other direction.

The settings for are in gitea.ini:

```
ROOT_URL  = %(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/gitea
```

Added a lightt.conf file to lightt configuration with:

```
$HTTP["url"] =~ "/gitea" {
    proxy.server = (
        "" => (
            "/gitea" => (
                "host" => "127.0.0.1",
                "port" => "3000",
            )
        )
    )
    proxy.header = (
        "map-urlpath" => (
            "/gitea/" => "/",
        ),
    )
}
```
