0

I have the Gitlab CE installed on a Ubuntu Virtual machine. I have purchased a domain that directs traffic like gitlab.mydomain.com to the ubuntu server running gitlab. Now I am going to also send every request to mydomain to the same Ubuntu.

I would like to configure the existing nginx in the gitlab CE to forward www request to a raspberry pi running Debian and nginx with ip 192.168.0.241. I already modified the gitlab.rb file to include custom nginx configuration files.

But now what should this configuration include so that only www traffic in http and https are forwarded correctly? so far i have this:

server {
servername www.mydomain.com;
location / {
proxypass http://192.168.0.241:80;
proxysetheader Host www.mydomain.com;
}
}

But what about https? If this works, I suppose I have to add a redirect HTTP to https rule also?

Or should I be better to let all traffic arrive on the RPI and then use the local nginx there to forward any request to gitlab.mydomain.com to the Ubuntu virtual machine? Thank you for your advice, Didier

Sivajee Battina
  • 4,124
  • 2
  • 22
  • 45

1 Answers1

0

I managed to successfully forward the request by letting all request arrive on the rpi nginx and then forward the gitlab request to nginx of the omnibus package. What to remember is that you need also to copy the ssl certificates then of the gitlab server to the rpi.