I’m trying to setup GitLab for personal projects on my own server with the omnibus installation and want to block all IP addresses other than my own.
Is this possible? I’ve tried the gitlab.rb config file but cannot find any related entries, and if I manually edit the nginx config I guess any reconfiguring will overwrite my changes. I can’t seem to find any documentation on this either.
What I want to do is what is done with nginx as such;
Edit “/etc/gitlab/gitlab.rb” like this and run gitlab-ctl reconfigure to put the configuration into “/var/opt/gitlab/nginx/conf/gitlab-http.conf”. Don’t forget to adapt your firewall if you used that way before.
I’ve tried this but when i’m checking the logs of the gitlab container i got the following as output,
==> /var/log/gitlab/nginx/error.log <==
2023/07/21 11:26:58 [emerg] 2018#0: invalid number of arguments in "root" directive in /var/opt/gitlab/nginx/conf/gitlab-http.conf:191
==> /var/log/gitlab/nginx/current <==
2023-07-21_11:26:58.49463 nginx: [emerg] invalid number of arguments in "root" directive in /var/opt/gitlab/nginx/conf/gitlab-http.conf:191
==> /var/log/gitlab/nginx/error.log <==
2023/07/21 11:26:59 [emerg] 2019#0: invalid number of arguments in "root" directive in /var/opt/gitlab/nginx/conf/gitlab-http.conf:191
==> /var/log/gitlab/nginx/current <==
2023-07-21_11:26:59.50100 nginx: [emerg] invalid number of arguments in "root" directive in /var/opt/gitlab/nginx/conf/gitlab-http.conf:191
==> /var/log/gitlab/nginx/error.log <==
2023/07/21 11:27:00 [emerg] 2020#0: invalid number of arguments in "root" directive in /var/opt/gitlab/nginx/conf/gitlab-http.conf:191
==> /var/log/gitlab/nginx/current <==
2023-07-21_11:27:00.51567 nginx: [emerg] invalid number of arguments in "root" directive in /var/opt/gitlab/nginx/conf/gitlab-http.conf:191