Всем привет, помогите разобраться с напастью, начал познавать haproxy в связи с рабочей необходимостью.
Задача при ввода Url типа https://my.server.ru/ сразу редиректить на каталог типа https://my.server.ru/1c_bd/ru_RU/
Это я сделал, но есть проблема, которая скорее всего связанная со структурой конфига haproxy, при переходе по ссылке и после редиректа старница начинает бесконечно рефрешится или редиректиться.
прикрепляю полный конфиг моего haproxy.
haproxy -c -f /etc/haproxy/haproxy.cfg ни на что не ругается, в логах кроме Apr 30 12:55:12 localhost haproxy[3124]: 192.168.1.92:53661 [30/Apr/2020:12:55:12.000] https-proxy~ 1c_path/s1 0/0/15/9/24 200 18570 - - ---- 2/1/0/0/0 0/0 "GET /SoftOnIT/ru_RU/ HTTP/1.1"
так же ничего нет…
#---------------------------------------------------------------------
# Example configuration for a possible web application. See the
# full configuration options online.
#
# http://haproxy.1wt.eu/download/1.4/doc/configuration.txt
#
#---------------------------------------------------------------------
#---------------------------------------------------------------------
# Global settings
#---------------------------------------------------------------------
global
# to have these messages end up in /var/log/haproxy.log you will
# need to:
#
# 1) configure syslog to accept network log events. This is done
# by adding the '-r' option to the SYSLOGD_OPTIONS in
# /etc/sysconfig/syslog
#
# 2) configure local2 events to go to the /var/log/haproxy.log
# file. A line like the following can be added to
# /etc/sysconfig/syslog
#
# local2.* /var/log/haproxy.log
#
log 127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 4000
user haproxy
group haproxy
daemon
ssl-server-verify none
ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS
ssl-default-bind-options no-sslv3
tune.ssl.default-dh-param 4096
# turn on stats unix socket
stats socket /var/lib/haproxy/stats
#---------------------------------------------------------------------
# common defaults that all the 'listen' and 'backend' sections will
# use if not designated in their block
#---------------------------------------------------------------------
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 http-proxy
bind *:80
redirect scheme https code 301 if !{ ssl_fc } #редирект на https
default_backend 1c_web
########Для установки и обновления letsencrypt##############
acl letsencrypt-acl path_beg /.well-known/acme-challenge/
use_backend letsencrypt-backend if letsencrypt-acl
#---------------------------------------------------------------
frontend https-proxy
bind *:443 ssl crt /etc/letsencrypt/live/my.server.ru/my.server.ru.pem
acl 1c hdr_end(host) -i my.server.ru
http-request set-path /SoftOnIT/ if 1c
use_backend 1c_path if 1c
default_backend 1c_web
#---------------------------------------------------------------
backend letsencrypt-backend
server letsencrypt 127.0.0.1:8888
#---------------------------------------------------------------
backend 1c_web
mode http
cookie SERVERID insert indirect nocache
server 1cweb 10.255.10.26:80 check cookie 1cweb
#---------------------------------------------------------------
backend 1c_path
server s1 10.255.10.26:443 ssl