cancel
Showing results for 
Search instead for 
Did you mean: 

SSL Breaks Checkout

SSL Breaks Checkout

I'm new to Magento and not a *nix pro, so I hope I'm just making a rookie mistake here. My setup...

 

  • Magento 2.1.4 CE
  • CentOS 7-3.1611
  • nginx 1.12.0 (SSL termination only)
  • Varnish 4.1.0
  • Apache 2.4.25
  • PHP 7.0.15
  • MySQL 5.7.17

 

Everything seems to work fine with http (non-SSL), but I need to use https for all pages.

 

When I enable https, everything seems to work fine except the CHECKOUT PAGE IS EMPTY (i.e., the "GET /checkout/" request returns "200 OK" but "Content-Length: 0"). There are no messages in the browser console. I'll mention that I'm using a self-signed certificate for development, but it seems to work okay.

 

If I go to the cart page (/checkout/cart/) first, I get errors in the browser console (which do NOT occur in non-SSL)...

 

...
VM27901:3 Uncaught TypeError: Cannot read property 'length' of null
    at visible (eval at createBindingsStringEvaluator (knockout.js:2624), :3:83)
    at update (knockout.js:4558)
    at ko.dependentObservable.disposeWhenNodeIsRemoved (knockout.js:3004)
    at evaluateImmediate (knockout.js:1737)
    at ko.subscription.evaluatePossiblyAsync [as callback] (knockout.js:1677)
    at Function.notifySubscribers (knockout.js:1103)
    at Function.observable.valueHasMutated (knockout.js:1300)
    at observable (knockout.js:1285)
    at Object.setShippingRates (shipping-service.js:22)
    at Object. (new-address.js:60)
visible @ VM27901:3
update @ knockout.js:4558
ko.dependentObservable.disposeWhenNodeIsRemoved @ knockout.js:3004
evaluateImmediate @ knockout.js:1737
evaluatePossiblyAsync @ knockout.js:1677
notifySubscribers @ knockout.js:1103
observable.valueHasMutated @ knockout.js:1300
observable @ knockout.js:1285
setShippingRates @ shipping-service.js:22
(anonymous) @ new-address.js:60
fire @ jquery.js:3099
fireWith @ jquery.js:3211
done @ jquery.js:9310
callback @ jquery.js:9720
...

 

I don't know if this is related, and there are a few more messages (which I can include if they'll be helpful), but the above seems to be the relevant section. I don't notice any other errors in the console on any other pages, either http or https.

 

Can anyone help me? I'm going bananas with this.

 

Thanks,

Scott B.

1 REPLY 1

Re: SSL Breaks Checkout

After much pulling of hair and gnashing of teeth, I tried switching to Apache for the SSL termination (eliminating nginx entirely and creating an Apache-Varnish-Apache sandwich). Things seem to work. Why? I don't know, and I'm not sure I care. It _did_ simplify the stack by one component; that's not a bad thing.

 

I'll say this: I _am_ new to Magento, but I don't suck at this kind of stuff, and this has been by far the hardest installation/configuration I've ever experienced (and that includes installing NetWare 2.0a from 104 5.25" floppy disks back in 1986). I'd s**tcan this whole thing if I didn't have so much time invested in it.