Answer the question
In order to leave comments, you need to log in
ERR_SPDY_PROTOCOL_ERROR after enabling HTTP/2 in nginx?
Nginx + Letenscrypt + HTTP2
When connecting to the site from the Chrome browser, there are a lot of errors in the console, in particular, images are not loaded, which is transmitted to the console:
GET https://*****.ru/img/1c383cd30b7c298ab50293adfecb7b18.jpg net::ERR_SPDY_PROTOCOL_ERROR
server {
listen 80;
server_name ****.ru www.****.ru;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;
server_name *****.ru www.*******.ru;
root /var/www/********.ru;
try_files $uri $uri/ @rewrite;
index index.php;
error_log /home/****/logs/********.ru.nginx.error.log;
# SSL сертификаты
ssl_certificate /etc/letsencrypt/live/******.ru/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/*******.ru/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_dhparam /etc/ssl/certs/dhparam.pem;
ssl_ciphers '**********';
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:50m;
ssl_stapling on;
ssl_stapling_verify on;
add_header Strict-Transport-Security max-age=15768000;
location ~ /.well-known {
allow all;
}
location ~* ^.+\.(jpg|jpeg|gif|png|ico|svg|js|css|txt|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar)$ {
access_log off;
expires 30d;
break;
}
location @rewrite {
rewrite ^/(.*)$ /index.php?route=$1;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Answer the question
In order to leave comments, you need to log in
Hello, did you solve the problem? After switching to http / 2, this is on all servers.
I suppose the solution is in nginx.conf
limit_conn_zone $binary_remote_addr zone=perip:20m;
limit_conn perip 20;
But too high values will reduce the performance to high attendance to nothing.
Maybe there are other options?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question