Call gitea as a subdomain of nginx

Hi together,

I have a small Server at home to do different things. One is to use as NAS and local git-server (More will following). As NAS, i run OpenMediaVault on it. Also i add gitea to organize git-repositories.

It works fine, but is only available with “servername:3000”, but i want to have it available like “git.servername” as a subdomain. gittea is running from extra User “git” On this Machine is ngingx running and the main-page is the administration-site of OpenMediaVault.

Does anybody know, how i can solve this ?
I have try so many things from different forums, but nothing is working for me.


Once you have it set up, it should be fairly easy to set up a subdomain which simply is a reverse proxy to gitea. For instance, this is the nginx config of my gitea instance.

server {
        listen 80;
        root /home/git/gf/public/;
        # set max upload to 5 mb
        client_max_body_size 5M;
        client_body_buffer_size 256K;

        location / {
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header Host $http_host;
                proxy_max_temp_file_size 0;
                proxy_pass http://localhost:3000;

    listen 443 ssl http2;
    # SSL SETTINGS (left out)
1 Like