Reverse Proxying my GitLab VM (with HTTPS) through my Nginx VM

Hello again GitLab community,

So, currently have my own Server at home with several VMs installed on Proxmox VE 5.3 as the primary OS and VM Manager:

  • Nginx VM: All VMs are supposed to reverse proxy through this VM.
  • Discourse VM: I’ve got this VM HTTPS reverse proxying properly. You can see the /etc/nginx/sites-available/discourse-https.conf file I have setup HERE.
  • ownCloud VM: I’ve got this VM HTTPS reverse proxying properly. You can see the /etc/nginx/sites-available/oc-https.conf file I have setup HERE.
  • GitLab VM: And the important one to talk about. I’ve got this VM HTTP reverse proxying properly (you can see the git-http.conf file HERE). However, HTTPS is not reverse proxying properly (you can see the git-https.conf file HERE). If I symbolic link git-https.conf in place of git-http.conf, and I go to git.myreserveddns.com or https://git.myreserveddns.com in a browser, it will try to connect to discourse.myrserveddns.com.

Also on my GitLab VM, at the time of this posting, my /etc/gitlab/gitlab.rb file looks like so ( vast majority of the file is commented out, so I’ll just share the uncommented bits):

...
external_url 'https://git.myreserveddns.com/'
...
nginx['redirect_http_to_https'] = true
registry_nginx['redirect_http_to_https'] = true
mattermost_nginx['redirect_http_to_https'] = true
...

I’ve tried following this guide, but it seems to assume GitLab and Nginx are on the same server. Let’s just say that trying to connect to discourse.myreserveddns.com, oc.myreserveddns.com and git.myreserveddns.com all resulted in Connection Errors when I tried to adapt it to a Multi-VM setup. So I’ve reverted my GitLab and Nginx VMs prior to making these changes.

I’ve also tried to follow the official guide, but again it looks to assume that Nginx and GitLab are set up on the same VM. I say this because I have no idea what I’m supposed to put for nginx['custom_gitlab_server_config'] and nginx['custom_nginx_config'], since both are asking me to put in local Nginx directory paths, and then the GitLab conf file is supposed to call on local GitLab directory paths.

Someone mind giving some details as to how I should go about setting up SSL key/cert pair and reverse proxying my GitLab VM through an Nginx VM? I have already posed a similar question to the Nginx Community, and have gotten some help … but I feel its inadequate in terms of what I need to do on the GitLab side.

If you need for me to provide more details, then please let me know.