Использование HAProxy версии: 2.1.3
Я сидел в /etc/haproxy/haproxy.cfg
файл:
frontend jira.mysite.com
# bind :::8080 v4v6
bind :::443 v4v6 ssl crt /home/user/ssl/server.pem
http-request redirect scheme https unless { ssl_fc }
default_backend jira
frontend confluence.mysite.com
# bind :::8090 v4v6
bind :::443 v4v6 ssl crt /home/user/ssl/server.pem
http-request redirect scheme https unless { ssl_fc }
default_backend confluence
backend jira
balance roundrobin
cookie JIRASESSIONID prefix nocache
http-request add-header X-Forwarded-Proto https if { ssl_fc }
server jira1 [IPv6 IP]:8080 check cookie jira1
server jira2 [IPv6 IP]:8080 check cookie jira2
backend confluence
balance roundrobin
cookie CONFSESSIONID prefix nocache
http-request add-header X-Forwarded-Proto https if { ssl_fc }
server confluence1 [IPv6 IP]:8090 check cookie confluence1
server confluence2 [IPv6 IP]:8090 check cookie confluence2
Прежде чем я добавлю 443
настройка 8080
и 8090
привязка работала хорошо.
Но в этом случае при перезапуске haproxy возникла такая ошибка:
Job for haproxy.service failed because the control process exited with error code. See "systemctl status haproxy.service" and "journalctl -xe" for details.
При использовании journalctl -xe
чтобы увидеть подробности, получил:
...
Feb 28 17:44:21 server systemd[1]: haproxy.service: control process exited, code=exited status=1
Feb 28 17:44:21 server haproxy[30436]: Errors found in configuration file, check it with 'haproxy check'.
Feb 28 17:44:21 server systemd[1]: Failed to start SYSV: HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited for high
-- Subject: Unit haproxy.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit haproxy.service has failed.
--
-- The result is failed.
Feb 28 17:44:21 server systemd[1]: Unit haproxy.service entered failed state.
Feb 28 17:44:21 server sudo[30429]: pam_unix(sudo:session): session closed for user root
Feb 28 17:44:21 server systemd[1]: haproxy.service failed.
Feb 28 17:44:21 server polkitd[2570]: Unregistered Authentication Agent for unix-process:30430:138824114 (system bus name :1.76278,
Почему не удалось запустить SYSV
?
Теперь, используя IPv6, как правильно его настроить?
Я сделал настройку конфигурации Jira (8.6.1) для <JIRA_INSTALL>/conf/server.xml
:
Закомментировать:
<Connector port="8080" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^\`"<>"
maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false"
maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="8443"
acceptCount="100" disableUploadTimeout="true" bindOnInit="false"/>
Раскомментировать:
<Connector port="8080" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^\`"<>"
maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false"
maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="8443"
acceptCount="100" disableUploadTimeout="true" bindOnInit="false" secure="true" scheme="https"
proxyName="<subdomain>.<domain>.com" proxyPort="443"/>
Возможно, это сработает, если установить настоящую proxyName
.