
This configuration is for any install of gitea whatever domain configured, 
but will rely in a configured port, so its just a proxy redir forwarded:

Create: /etc/nginx/conf.d/gitea.conf

```
location ^~ /gitea/ {
  proxy_set_header        Host $host;
  proxy_set_header        X-Real-IP $remote_addr;
  proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_set_header        X-Forwarded-Proto $scheme;
  proxy_pass              http://0.0.0.0:3001/;
}
```

This configuration will use socket, more efficient, but 
will hiyacked all the webserver root to gitea for subpaths urls must tune up:

Update /etc/gitea/conf/app.ini:

```
[server]
PROTOCOL = unix
DOMAIN = git.giteavenenux.org
ROOT_URL = http://git.giteavenenux.org/
HTTP_ADDR = /var/tmp/gitea.sock
HTTP_PORT =
```

Create: /etc/nginx/conf.d/gitea.conf

```
upstream _gitea {
        server unix:/var/tmp/gitea.sock;
}

server {
        server_name _;
        root /usr/share/gitea/public;

        location / {
                try_files $uri @proxy;
        }

        location @proxy {
                include proxy_params;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_buffering off;
                proxy_pass http://_gitea;
        }
}
```
