HTTP_ADDR can't be changed from 0.0.0.0 #1489

Closed
opened 2025-11-02 04:02:15 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @onewhaleid on GitHub (Jan 31, 2018).

I am trying to set up an IP whitelist for my gitea server. I have set a value for HTTP_ADDR to include all of the machines in my subnet, but when I try to run 'gitea web` I just get this message:

2018/02/01 10:52:38 [T] AppPath: /home/git/gitea
2018/02/01 10:52:38 [T] AppWorkPath: /home/git
2018/02/01 10:52:38 [T] Custom path: /home/git/custom
2018/02/01 10:52:38 [T] Log path: /home/git/log

Then gitea exits. I can't get gitea to run unless I use HTTP_ADDR = 0.0.0.0

How do I set up an IP whitelist?

Originally created by @onewhaleid on GitHub (Jan 31, 2018). I am trying to set up an IP whitelist for my gitea server. I have set a value for `HTTP_ADDR` to include all of the machines in my subnet, but when I try to run 'gitea web` I just get this message: ``` 2018/02/01 10:52:38 [T] AppPath: /home/git/gitea 2018/02/01 10:52:38 [T] AppWorkPath: /home/git 2018/02/01 10:52:38 [T] Custom path: /home/git/custom 2018/02/01 10:52:38 [T] Log path: /home/git/log ``` Then gitea exits. I can't get gitea to run unless I use `HTTP_ADDR = 0.0.0.0` How do I set up an IP whitelist?
GiteaMirror added the type/question label 2025-11-02 04:02:15 -06:00
Author
Owner

@lafriks commented on GitHub (Feb 1, 2018):

This is not for whitelisting IP addresses that can connect to gitea. It is an IP address gitea will listen on, 0.0.0.0 meaning any IP address server has

@lafriks commented on GitHub (Feb 1, 2018): This is not for whitelisting IP addresses that can connect to gitea. It is an IP address gitea will listen on, 0.0.0.0 meaning any IP address server has
Author
Owner

@onewhaleid commented on GitHub (Feb 1, 2018):

Is it possible to set up an IP whitelist?

@onewhaleid commented on GitHub (Feb 1, 2018): Is it possible to set up an IP whitelist?
Author
Owner

@lafriks commented on GitHub (Feb 1, 2018):

You can if you setup nginx in front of gitea for example

@lafriks commented on GitHub (Feb 1, 2018): You can if you setup nginx in front of gitea for example
Author
Owner

@onewhaleid commented on GitHub (Feb 1, 2018):

Interesting. I have an apache server running, and I setup an IP whitelist, but it didn't work. If I tried to access the site on a non-whitelisted IP this happened:

www.mydomain.com - 403 error (as desired)
www.mydomain.com:3000 - gitea loaded normally

I assumed gitea had its own listening service which was bypassing apache.

@onewhaleid commented on GitHub (Feb 1, 2018): Interesting. I have an apache server running, and I setup an IP whitelist, but it didn't work. If I tried to access the site on a non-whitelisted IP this happened: `www.mydomain.com` - 403 error (as desired) `www.mydomain.com:3000` - gitea loaded normally I assumed gitea had its own listening service which was bypassing apache.
Author
Owner

@lafriks commented on GitHub (Feb 1, 2018):

You need to setup http_addr = 127.0.0.1 and setup Apache to proxy requests from it to http://127.0.0.1:3000/

@lafriks commented on GitHub (Feb 1, 2018): You need to setup http_addr = 127.0.0.1 and setup Apache to proxy requests from it to http://127.0.0.1:3000/
Author
Owner

@onewhaleid commented on GitHub (Feb 1, 2018):

@lafriks: thank you, this appears to be an issue with apache rather than gitea.

@onewhaleid commented on GitHub (Feb 1, 2018): @lafriks: thank you, this appears to be an issue with apache rather than gitea.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1489