DidierDR
By:
DidierDR

redirect www request to nginx server using gitlab ce omnibus package

October 18, 2017 145 views
Nginx Debian

Dear all,

I have the Gitlab CE installed on a ubuntu 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 www.mydomain.com to the same ubuntu.
I would like to configure the existing nginx in the gitlab CE to forward www request to a server 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 / {
proxy
pass 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?

Thx for your advice,
Didier

1 comment
  • I also could modify the the debian nginx who would recieve all request to forward requests to gitlab.mydomain.com to the ubuntu server.

1 Answer
DidierDR October 19, 2017
Accepted Answer

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.

Have another answer? Share your knowledge.