One of my WordPress sites has a lot of static images (think at least 20 per page) and after I enable HTTP/2, the images in the lower part start to appear as broken (crossed out, like in images with dead links). Nothing wrong shows up in error.log file, but Chrome 53 says like this in the console:
Failed to load resource: net::ERR_SPDY_PROTOCOL_ERROR
I tried messing with client_max_body_size
but that was no luck.
edit: this is my nginx.conf:
load_module /usr/local/libexec/nginx/ngx_mail_module.so;
load_module /usr/local/libexec/nginx/ngx_stream_module.so;
user www;
worker_processes 4;
error_log /var/log/nginx/error.log info;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
client_body_buffer_size 10K;
client_header_buffer_size 1k;
client_max_body_size 0;
large_client_header_buffers 2 1k;
client_body_timeout 12;
send_timeout 10;
#keepalive_timeout 0;
keepalive_timeout 65;
gzip off;
charset UTF-8;
server {
listen 80;
server_name manuth.life www.manuth.life;
server_tokens off;
return 301 https://$server_name$request_uri; #redirects to HTTPS
root /usr/local/www/nginx/manuth.life;
index index.php index.html index.htm;
access_log /var/log/nginx/manuth.life.access.log;
error_log /var/log/nginx/manuth.life.error.log;
error_page 500 502 503 504 /50x.html;
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/local/www/nginx-dist;
}
}
server {
listen 443 ssl http2;
server_name manuth.life www.manuth.life;
server_tokens off;
root /usr/local/www/nginx/manuth.life;
index index.php index.html index.htm;
access_log /var/log/nginx/manuth.life.access.log;
error_log /var/log/nginx/manuth.life.error.log;
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/local/www/nginx-dist;
}
# strict SSL settings
ssl_certificate /usr/local/etc/letsencrypt/live/manuth.life/fullchain.pem;
ssl_certificate_key /usr/local/etc/letsencrypt/live/manuth.life/privkey.pem;
ssl_session_timeout 5m;
ssl_protocols TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
ssl_ecdh_curve secp384r1; #
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_session_tickets off;
ssl_stapling on;
ssl_stapling_verify on;
ssl_dhparam /usr/local/etc/ssl/dhparam.pem;
resolver 8.8.8.8 8.8.4.4 valid=300s;
resolver_timeout 10s;
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
include fastcgi_params;
}
}
}