How configure gitlab server, public access only VPN

Hello community, I’m reaching out for help with an issue. I’m trying to restrict access so that only a GitLab server’s page is displayed when connected via VPN.

I’ve created a configuration with a location block and VPN IPs to ensure the page is only accessible when connected to the VPN.

The problem is that when I apply the configuration and run reconfigure, the changes are reverted. It doesn’t retain the modifications.

The file where I’m applying the configuration is gitlab-http.conf, located at /var/opt/gitlab/nginx/conf.

Do you have any idea why the changes are lost when applying reconfigure, and how can I make sure they are retained?

The GitLab server was deployed from a Proxmox template that already includes GitLab.