Opened 2 years ago

Closed 2 years ago

#1755 closed defect (duplicate)

listen address and http2

Reported by: grimclaw@… Owned by:
Priority: minor Milestone:
Component: nginx-core Version: 1.15.x
Keywords: http2 Cc:
uname -a: Linux wpressdev 4.9.0-8-amd64 #1 SMP Debian 4.9.144-3.1 (2019-02-19) x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.15.10
built by gcc 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)
built with OpenSSL 1.1.0j 20 Nov 2018 (running with OpenSSL 1.1.1b 26 Feb 2019)
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/ --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-g -O2 -fdebug-prefix-map=/data/builder/debuild/nginx-1.15.10/debian/debuild-base/nginx-1.15.10=. -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC' --with-ld-opt='-Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie'



I'm sure this is very much an edge case so I'm not expecting mountains to be moved :)

Environment configuration:

This is all running in a VirtualBox debian based virtual machine on a Windows desktop. The VM has two interface adapters, one NAT based and one host only adapter for viewing pages from the virtual machine's nginx server. Web sites are pointed to the VM using the windows hosts file at the host only adapter IP.

When enabling http2 on a listen directive that includes the host only adapter IP address to a PHP based application nginx returns an octet-stream response similar to:


The results are random. If I disable http2 the applications ( wordpress and laravel are both affected ) return the desired responses.

Here is the faulty nginx configuration:

server {

listen http2;

root /srv/;
index index.php index.html index.htm;

access_log /srv/;
error_log /srv/;

add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";

charset utf-8;

location = /favicon.ico {

access_log off;
log_not_found off;


location = /robots.txt {

access_log off;
log_not_found off;


location / {

try_files $uri $uri/ /index.php?$query_string;


location ~ \.php$ {

fastcgi_keep_conn on;
try_files $uri = 404;
fastcgi_split_path_info (.+\.php)(/.+)$;

fastcgi_pass unix:/run/php/php7.3-fpm-testing.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;


location ~ /\.(?!well-known).* {

deny all;



without the http2 directive it runs absolutely fine.

Again I understand this is likely an edge case and I should probably move my development environment to something a little more sane.

Thank you!

Change History (1)

comment:1 by Maxim Dounin, 2 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #808.

Note: See TracTickets for help on using tickets.