10.22.12.54哈代IP地址
10.22.12.55 Apache web IP地址
fqdn hasan.example.com在10.22.12.54中解析
在我的haproxy配置中
global
log /dev/log local0
log /dev/log local1 notice
maxconn 100000
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd
listeners
stats timeout 30s
user haproxy
group haproxy
daemon
ca-base /etc/ssl/certs
crt-base /etc/ssl/private
defaults
log global
mode tcp
maxconn 1000000
option httplog
timeout connect 5000
timeout client 50000
timeout server 50000
errorfile 400 /etc/haproxy/errors/400.http
errorfile 403 /etc/haproxy/errors/403.http
errorfile 408 /etc/haproxy/errors/408.http
errorfile 500 /etc/haproxy/errors/500.http
errorfile 502 /etc/haproxy/errors/502.http
errorfile 503 /etc/haproxy/errors/503.http
errorfile 504 /etc/haproxy/errors/504.http
frontend Front-"443"
bind *:443
mode tcp
use_backend hasan
backend hasan
mode tcp
option ssl-hello-chk
server hasan 10.22.12.55:443 send-proxy-v2APACHE
<VirtualHost *:443>
ServerName hasan.example.com:443
DocumentRoot /var/www/html/
ErrorLog logs/ssl_error_log
TransferLog logs/ssl_access_log
LogLevel debug
SSLProxyEngine on
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite HIGH:3DES:!aNULL:!MD5:!SEED:!IDEA
SSLCertificateFile /etc/httpd/conf.d/ssl/cert.pem
SSLCertificateKeyFile /etc/httpd/conf.d/ssl/key.pem
LogFormat "%a %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
CustomLog "logs/ssl_access_hasan_log" combined
ErrorLog "logs/ssl_errors_hasan.log
</VirtualHost>RemoteIPModule配置
RemoteIPHeader X-Forwarded-For
RemoteIPTrustedProxy 10.22.12.54注:
我的证书CN在apache ServerName指令中相同
我的证书和私钥位于
代理: /etc/ssl/certs/和/etc/ssl/私有/
apache:/etc/httpd/conf.d.d/ssl
apache中的--我观察到了
清华8月15日11:36:23.368657 2019 pid 4058 SSL库错误:错误:140760fc: SSL routines:SSL23_GET_CLIENT_HELLO:unknown协议--不是SSL到HTTPS端口!?清华8月15日11:36:23.368660 2019 pid 4058 AH01998:清华8月15日11:36:24.704663 2019 pid 4056 AH01964:建立子服务器hasan.example.com:443 11:36:24.704820 2019 pid 4056 AH02008: SSL库错误1在握手(服务器hasan.example.com:443)清华8月15日11:36:24.704840 2019 pid 4056 SSL图书馆错误:错误:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown协议--不是SSL到HTTPS端口!?
注:
没有发送代理,一切都正常工作。
但我需要用
1)在HAPROXY中使用TCP模式
2) HAPROXY后端的发送代理
3) Apache端的RemoteIP模块
发布于 2019-08-23 11:54:12
Base CentOS 7 repo的最新版本(当我使用yum httpd时)无法理解"RemoteIPProxyProtocol On“
在最新的apt存储库中也有相同的情况。
当我从源代码**编译apache时,我解决了这个问题。
https://stackoverflow.com/questions/57506486
复制相似问题