Answer the question
In order to leave comments, you need to log in
How to migrate gitlab from haproxy to Nginx?
we want to transfer gitlab from haproxy to Nginx, for some reason the config does not work
Nginx config
server
{
listen 80;
server_name gitlab.*.ru;
location /
{
return 301 https://gitlab.*.ru;
}
}
server
{
listen 443 ssl;
server_name gitlab.*.ru;
location /
{
proxy_pass http://10.*.*.50;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Ssl on;
}
}
global
log 127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 4000
user haproxy
group haproxy
daemon
tune.ssl.default-dh-param 2048
stats socket /var/lib/haproxy/stats
defaults
mode http
log global
option httplog
option dontlognull
option http-server-close
option forwardfor except 127.0.0.0/8
option redispatch
retries 3
timeout http-request 10s
timeout queue 1m
timeout connect 10s
timeout client 1m
timeout server 1m
timeout http-keep-alive 10s
timeout check 10s
maxconn 3000
frontend www-http
bind *:80
reqadd X-Forwarded-Proto:\ http
frontend gitlab_front
bind 80.*.*.*:443
mode tcp
use_backend gitlab
backend gitlab
mode tcp
option ssl-hello-chk
server gitlab_server 10.*.*.*:443
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question