0

Im running Magento in 192.169.1.250 (no ssl) URL - http://192.168.1.250:80 and varnish + nginx (ssl offloading) in 192.168.1.9 frontend URL - https://192.168.1.9:80 varnish 127.0.0.1:6081

Used the default varnish default.vcl file generated by Magento backoffice no changes in Magento Nginx config too.

But when I access https://192.168.1.9 the url is redirected to https://192.168.1.250. But I can access the magento storefront with http://192.168.1.250 no issues

let me know if any other details req

varnish log

  • << BeReq >> 32784
  • Begin bereq 32783 fetch
  • Timestamp Start: 1594988018.618675 0.000000 0.000000
  • BereqMethod GET
  • BereqURL /
  • BereqProtocol HTTP/1.1
  • BereqHeader Host: 192.168.1.9:6081
  • BereqHeader Upgrade-Insecure-Requests: 1
  • BereqHeader User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36 Edg/83.0.478.64
  • BereqHeader Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9
  • BereqHeader Accept-Language: en-US,en;q=0.9
  • BereqHeader Cookie: PHPSESSID=dde5bhbam76djce6pfn587is5r
  • BereqHeader X-Forwarded-For: 192.168.1.7
  • BereqHeader grace: none
  • BereqHeader Accept-Encoding: gzip
  • BereqHeader X-Varnish: 32784
  • VCL_call BACKEND_FETCH
  • VCL_return fetch
  • BackendOpen 26 boot.default 192.168.1.250 80 192.168.1.9 57404
  • BackendStart 192.168.1.250 80
  • Timestamp Bereq: 1594988018.618732 0.000057 0.000057
  • Timestamp Beresp: 1594988018.760098 0.141424 0.141367
  • BerespProtocol HTTP/1.1
  • BerespStatus 302
  • BerespReason Found
  • BerespHeader Server: nginx/1.14.0 (Ubuntu)
  • BerespHeader Date: Fri, 17 Jul 2020 12:13:38 GMT
  • BerespHeader Content-Type: text/html; charset=UTF-8
  • BerespHeader Transfer-Encoding: chunked
  • BerespHeader Connection: keep-alive
  • BerespHeader Set-Cookie: PHPSESSID=dde5bhbam76djce6pfn587is5r; expires=Fri, 17-Jul-2020 13:13:38 GMT; Max-Age=3600; path=/; domain=192.168.1.9; HttpOnly
  • BerespHeader Location: http://192.168.1.250/
  • BerespHeader Pragma: no-cache
  • BerespHeader Cache-Control: max-age=0, must-revalidate, no-cache, no-store
  • BerespHeader Expires: Wed, 17 Jul 2019 12:13:38 GMT
  • BerespHeader Content-Security-Policy-Report-Only: font-src 'self' 'unsafe-inline'; form-action geostag.cardinalcommerce.com geo.cardinalcommerce.com 1eafstag.cardinalcommerce.com 1eaf.cardinalcommerce.com centinelapistag.cardinalcommerce.com centinelapi.cardinalcomme
  • BerespHeader X-Content-Type-Options: nosniff
  • BerespHeader X-XSS-Protection: 1; mode=block
  • BerespHeader X-Frame-Options: SAMEORIGIN
  • BerespHeader Content-Encoding: gzip
  • BerespHeader Vary: Accept-Encoding
  • TTL RFC 0 10 0 1594988019 1594988019 1594988018 1563365618 0
  • VCL_call BACKEND_RESPONSE
  • TTL VCL 0 259200 0 1594988019
  • TTL VCL 0 259200 0 1594988019
  • VCL_return deliver
  • BerespUnset Content-Encoding: gzip
  • BerespHeader Content-Encoding: gzip
  • Storage malloc Transient
  • ObjProtocol HTTP/1.1
  • ObjStatus 302
  • ObjReason Found
  • ObjHeader Server: nginx/1.14.0 (Ubuntu)
  • ObjHeader Date: Fri, 17 Jul 2020 12:13:38 GMT
  • ObjHeader Content-Type: text/html; charset=UTF-8
  • ObjHeader Set-Cookie: PHPSESSID=dde5bhbam76djce6pfn587is5r; expires=Fri, 17-Jul-2020 13:13:38 GMT; Max-Age=3600; path=/; domain=192.168.1.9; HttpOnly
  • ObjHeader Location: http://192.168.1.250/
  • ObjHeader Pragma: no-cache
  • ObjHeader Cache-Control: max-age=0, must-revalidate, no-cache, no-store
  • ObjHeader Expires: Wed, 17 Jul 2019 12:13:38 GMT
  • ObjHeader Content-Security-Policy-Report-Only: font-src 'self' 'unsafe-inline'; form-action geostag.cardinalcommerce.com geo.cardinalcommerce.com 1eafstag.cardinalcommerce.com 1eaf.cardinalcommerce.com centinelapistag.cardinalcommerce.com centinelapi.cardinalcomme
  • ObjHeader X-Content-Type-Options: nosniff
  • ObjHeader X-XSS-Protection: 1; mode=block
  • ObjHeader X-Frame-Options: SAMEORIGIN
  • ObjHeader Vary: Accept-Encoding
  • ObjHeader Content-Encoding: gzip
  • Fetch_Body 2 chunked -
  • Gzip G F E 0 20 80 80 90
  • Gzip U F - 20 0 80 80 90
  • BackendReuse 26 boot.default
  • Timestamp BerespBody: 1594988018.760240 0.141566 0.000142
  • Length 20
  • BereqAcct 514 0 514 2553 0 2553
  • End
  • << Request >> 32783
  • Begin req 32782 rxreq
  • Timestamp Start: 1594988018.618581 0.000000 0.000000
  • Timestamp Req: 1594988018.618581 0.000000 0.000000
  • ReqStart 192.168.1.7 53361
  • ReqMethod GET
  • ReqURL /
  • ReqProtocol HTTP/1.1
  • ReqHeader Host: 192.168.1.9:6081
  • ReqHeader Connection: keep-alive
  • ReqHeader Upgrade-Insecure-Requests: 1
  • ReqHeader User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36 Edg/83.0.478.64
  • ReqHeader Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9
  • ReqHeader Accept-Encoding: gzip, deflate
  • ReqHeader Accept-Language: en-US,en;q=0.9
  • ReqHeader Cookie: PHPSESSID=dde5bhbam76djce6pfn587is5r
  • ReqHeader X-Forwarded-For: 192.168.1.7
  • VCL_call RECV
  • ReqHeader grace: none
  • ReqURL /
  • ReqUnset Accept-Encoding: gzip, deflate
  • ReqHeader Accept-Encoding: gzip
  • VCL_return hash
  • VCL_call HASH
  • VCL_return lookup
  • VCL_call MISS
  • VCL_return fetch
  • Link bereq 32784 fetch
  • Timestamp Fetch: 1594988018.760291 0.141710 0.141710
  • RespProtocol HTTP/1.1
  • RespStatus 302
  • RespReason Found
  • RespHeader Server: nginx/1.14.0 (Ubuntu)
  • RespHeader Date: Fri, 17 Jul 2020 12:13:38 GMT
  • RespHeader Content-Type: text/html; charset=UTF-8
  • RespHeader Set-Cookie: PHPSESSID=dde5bhbam76djce6pfn587is5r; expires=Fri, 17-Jul-2020 13:13:38 GMT; Max-Age=3600; path=/; domain=192.168.1.9; HttpOnly
  • RespHeader Location: http://192.168.1.250/
  • RespHeader Pragma: no-cache
  • RespHeader Cache-Control: max-age=0, must-revalidate, no-cache, no-store
  • RespHeader Expires: Wed, 17 Jul 2019 12:13:38 GMT
  • RespHeader Content-Security-Policy-Report-Only: font-src 'self' 'unsafe-inline'; form-action geostag.cardinalcommerce.com geo.cardinalcommerce.com 1eafstag.cardinalcommerce.com 1eaf.cardinalcommerce.com centinelapistag.cardinalcommerce.com centinelapi.cardinalcomme
  • RespHeader X-Content-Type-Options: nosniff
  • RespHeader X-XSS-Protection: 1; mode=block
  • RespHeader X-Frame-Options: SAMEORIGIN
  • RespHeader Vary: Accept-Encoding
  • RespHeader Content-Encoding: gzip
  • RespHeader X-Varnish: 32783
  • RespHeader Age: 0
  • RespHeader Via: 1.1 varnish (Varnish/5.2)
  • VCL_call DELIVER
  • RespUnset Age: 0
  • RespUnset Pragma: no-cache
  • RespHeader Pragma: no-cache
  • RespUnset Expires: Wed, 17 Jul 2019 12:13:38 GMT
  • RespHeader Expires: -1
  • RespUnset Cache-Control: max-age=0, must-revalidate, no-cache, no-store
  • RespHeader Cache-Control: no-store, no-cache, must-revalidate, max-age=0
  • RespUnset Server: nginx/1.14.0 (Ubuntu)
  • RespUnset X-Varnish: 32783
  • RespUnset Via: 1.1 varnish (Varnish/5.2)
  • VCL_return deliver
  • Timestamp Process: 1594988018.760308 0.141727 0.000017
  • RespHeader Content-Length: 20
  • RespHeader Connection: keep-alive
  • Timestamp Resp: 1594988018.760327 0.141746 0.000019
  • ReqAcct 486 0 486 2487 20 2507
  • End
  • << Session >> 10
  • Begin sess 0 HTTP/1
  • SessOpen 192.168.1.7 53362 a0 192.168.1.9 6081 1594988018.610281 22
  • SessClose RX_TIMEOUT 5.006
  • End
  • << Session >> 32782
  • Begin sess 0 HTTP/1
  • SessOpen 192.168.1.7 53361 a0 192.168.1.9 6081 1594988018.609999 23
  • Link req 32783 rxreq
  • SessClose RX_TIMEOUT 5.152
  • End

1 Answer 1

0

Lol problem fixed it the Magento which is redirecting changed settings in BackOffice - auto-redirect base URL to no. this fixed the 302 redirect enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .