Change localhost:3000 to sub-domain address

I’m trying to change url of my gogs from localhost to my sub-domain.

Using NGINX.
Configured my sub-domain for git. mydomain. example
then added to nginx.conf http section:
server {
listen 80;
server_name git. mydomain. com;
location / {
proxy_pass http://localhost:3000;
}
}

gogs/custom/app.ini:
[server]
DOMAIN = git. mydomain. com
HTTP_PORT = 3000
ROOT_URL = https://git. mydomain. com/
DISABLE_SSH = false
SSH_PORT = 22
START_SSH_SERVER = false
OFFLINE_MODE = false

(domains without spaces, gogs don’t allow me use more than 2 links since im new)

But it’s still available under address git. mydomain. com:3000 on http protocol, but under git. mydomain. com on https it’s not.

Googed a lot, nothing helps. Mb someone here could help me.

Thanks.