Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 11 devices fail to access nginx HTTPS site secured with LetsEncrypt (Protocol error)

Since a couple of days, users that just updated to iOS 11 cannot access my website. It's hosted via a nginx reverse proxy that is using LetsEncrypt to provide SSL.

The client experience is, that if you click a link, usually the safari window just disappears or shows a generic error.

Using the debugger, there's an error: [Error[ Failed to load resource: The operation couldn't be completed. Protocol Error

This only happens with iOS devices since the update to iOS 11.

My Server is running on DigitalOcean with the docker image jwilder/nginx-proxy.

like image 549
Dominik Fretz Avatar asked Oct 21 '17 18:10

Dominik Fretz


1 Answers

Ok, I actually found the issue to be related to an improper implementation of HTTP2 in iOS11.

This post shed some light on the situation: http://www.essential.exchange/2017/09/18/ios-11-about-to-release-things-to-be-aware-of/

The jwilder/nginx-proxy docker image is using http2 by default and as far as I can see you can't change that either.

No, to solve the issue, remove the http2 keyword in your server configuration for now.

This:

server {
  listen x.x.x.x:443 ssl http2;
  server_name xxxx;
  [...]
}

Becomes:

server {
  listen x.x.x.x:443 ssl;
  server_name xxxx;
  [...]
}

If you're running jwilder/nginx-proxy you will have to change /app/nginx.tmpl too, otherwise, the config file will be rewritten at one point.

Hope this answer helps some people struggling with the same problem. If you find another solution to fix this, please add it below. I haven't had too much time to look for solutions as it took me forever to find this one.

like image 161
Dominik Fretz Avatar answered Nov 05 '22 00:11

Dominik Fretz