Hi,
Le 16/05/2012 17:33, hapr...@serverphorums.com a écrit :
I have this simplified frontend:
frontend all
bind 0.0.0.0:80
bind 0.0.0.0:81 # secure
acl is-ssl dst_port 81
reqadd X-Proto:\ SSL if is-ssl
This all makes sense. But then I look at my nginx logs (last entry on the line
is X-Proto):
16/May/2012:08:29:06 -0700 GET /login HTTP/1.1 - SSL
16/May/2012:08:29:06 -0700 GET /assets/application.css HTTP/1.1 - -
16/May/2012:08:29:06 -0700 GET /assets/application.js HTTP/1.1 - SSL
16/May/2012:08:29:06 -0700 GET /assets/dashboard/header_bg.png HTTP/1.1 - -
16/May/2012:08:29:06 -0700 GET /assets/dashboard/logo.png HTTP/1.1 - -
16/May/2012:08:29:06 -0700 GET /assets/dashboard/content-header_bg.png HTTP/1.1
- -
16/May/2012:08:29:06 -0700 GET /assets/dashboard/bluebutton_bg.png HTTP/1.1 -
SSL
16/May/2012:08:29:06 -0700 GET /assets/dashboard/icons/calendar.png HTTP/1.1 -
SSL
16/May/2012:08:29:06 -0700 GET /favicon.ico HTTP/1.1 - -
16/May/2012:08:29:20 -0700 GET /login HTTP/1.1 - -
16/May/2012:08:29:20 -0700 GET /assets/application.css HTTP/1.1 - -
16/May/2012:08:29:20 -0700 GET /assets/application.js HTTP/1.1 - -
16/May/2012:08:29:20 -0700 GET /assets/dashboard/header_bg.png HTTP/1.1 - -
16/May/2012:08:29:20 -0700 GET /assets/dashboard/logo.png HTTP/1.1 - -
16/May/2012:08:29:20 -0700 GET /assets/dashboard/content-header_bg.png HTTP/1.1
- -
16/May/2012:08:29:20 -0700 GET /assets/dashboard/bluebutton_bg.png HTTP/1.1 - -
16/May/2012:08:29:20 -0700 GET /assets/dashboard/icons/calendar.png HTTP/1.1 -
SSL
16/May/2012:08:29:20 -0700 GET /favicon.ico HTTP/1.1 - -
You can see from these two reloads of the login page that the header is not
being added to each request. Why is this?
I assume you didn't use one of the option "httpclose" or
"http-server-close". This is mandatory if you want haproxy to analyze
every requests in the same connection, otherwise haproxy works in
"tunnel mode".
In this mode, haproxy only analyzes the first request of the connection
and consider anything after the first headers as pure data.
- option httpclose :
http://cbonte.github.com/haproxy-dconv/configuration-1.4.html#option%20httpclose
- option http-server-close :
http://cbonte.github.com/haproxy-dconv/configuration-1.4.html#option%20http-server-close
Much thanks!
---
posted at http://www.serverphorums.com
http://www.serverphorums.com/read.php?10,497415,497415#msg-497415
--
Cyril Bonté