Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zevenet can not pass request.scheme correctly #94

Open
gennpix opened this issue Dec 29, 2020 · 5 comments
Open

zevenet can not pass request.scheme correctly #94

gennpix opened this issue Dec 29, 2020 · 5 comments

Comments

@gennpix
Copy link

gennpix commented Dec 29, 2020

Hello,

zlb can not pass request.scheme(https) to our http backend, could you please help me to resolve it?

Our System Information
Zevenet Version: 5.11.2
Appliance Version: ZCE 6
Kernel Version: 4.19.0-6-amd64
Hostname: zlb1
System Date: Tue Dec 29 16:55:24 2020
zproxy 0.2.4-5.11.2

cfg file as below:

######################################################################
##GLOBAL OPTIONS
User		"root"
Group		"root"
Name		prod-https
## allow PUT and DELETE also (by default only GET, POST and HEAD)?:
#ExtendedHTTP	0
## Logging: (goes to syslog by default)
##	0	no logging
##	1	normal
##	2	extended
##	3	Apache-style (common log format)
#LogFacility	local5
LogLevel 	5
## check timeouts:
Timeout		45
ConnTO		20
Alive		10
Client		30
ThreadModel	dynamic
Control 	"/tmp/prod-https_proxy.socket"
DHParams 	"/usr/local/zevenet/app/zproxy/etc/dh2048.pem"
ECDHCurve 	"prime256v1"


#HTTP(S) LISTENERS
ListenHTTPS
	Err414 "/usr/local/zevenet/config/prod-https_Err414.html"
	Err500 "/usr/local/zevenet/config/prod-https_Err500.html"
	Err501 "/usr/local/zevenet/config/prod-https_Err501.html"
	Err503 "/usr/local/zevenet/config/prod-https_Err503.html"
	Address 192.168.2.119
	Port 443
	xHTTP 1
	RewriteLocation 1

	Cert "/usr/local/zevenet/config/certificates/domain.pem"
	Ciphers "ALL"
	Disable SSLv3
	Disable SSLv2
	SSLHonorCipherOrder 1
	#ZWACL-INI

	Service "api"
		##False##HTTPS-backend##
		#DynScale 1
		#BackendCookie "ZENSESSIONID" "domainname.com" "/" 0
		HeadRequire "Host: api.domain.com"
		#Url ""
		#Redirect ""
		StrictTransportSecurity 21600000
		Session
			Type IP
			TTL 120
#			#ID "sessionname"
		End
		#BackEnd

		BackEnd
			Address 192.168.11.249
			Port 8000
			TimeOut 30
			Weight 1
		End
		#End
	End
	#ZWACL-END


	#Service "prod-https"
		##False##HTTPS-backend##
		#DynScale 1
		#BackendCookie "ZENSESSIONID" "domainname.com" "/" 0
		#HeadRequire "Host: "
		#Url ""
		#Redirect ""
		#StrictTransportSecurity 21600000
		#Session
			#Type nothing
			#TTL 120
			#ID "sessionname"
		#End
		#BackEnd

		#End
	#End


End

request url is: https://api.domain.com/, but backend get http scheme (we expect https). If we use nginx as reverse proxy, backend get request scheme is https.

Thank you

@Nctllnty
Copy link

oh,i have the same question!

@emiliocampos-zevenet
Copy link
Contributor

emiliocampos-zevenet commented Dec 29, 2020 via email

@gennpix
Copy link
Author

gennpix commented Dec 30, 2020

cur request and response as below:
debug

@emiliocampos-zevenet
Copy link
Contributor

emiliocampos-zevenet commented Dec 30, 2020 via email

@abdessamad-zevenet
Copy link

Hi,
The sheme is not part of the HTTP request, it is known just by checking if the connection is using SSL or not. In this case, based on the above cfg file, you have configured a non HTTPS backend, so between the proxy and your backend they talk plain HTTP. if you want HTTPS you need to configure the backend port 8000 to use SSL and enable for the backend the HTTPS option in ZEVENET webGUI, which will add the flag HTTPS to the backend section in the configuration file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants