#2483 closed enhancement (invalid)
http/3 behaves differently with fastcgi_param/php variables breaks Magento admin page redirection
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | minor | Milestone: | nginx-1.26 |
Component: | http/3 | Version: | 1.23.x |
Keywords: | Cc: | ||
uname -a: | Linux a2.palmit.au 5.15.0-1032-oracle #38-Ubuntu SMP Thu Mar 23 19:30:10 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux | ||
nginx -V: |
nginx version: nginx/1.23.4 (quic-8347620e0e76-BoringSSL-2e13e36e7477cfe2ef48312634b1c34103da4899-brotli-more-njs-geoip-modsec-20230414163035)
built by gcc 11.3.0 (Ubuntu 11.3.0-1ubuntu1~22.04) built with OpenSSL 1.1.1 (compatible; BoringSSL) (running with BoringSSL) TLS SNI support enabled configure arguments: --build=quic-8347620e0e76-BoringSSL-2e13e36e7477cfe2ef48312634b1c34103da4899-brotli-more-njs-geoip-modsec-20230414163035 --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/nginx.pid --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-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-http_perl_module=dynamic --with-threads --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-stream_realip_module --with-stream_geoip_module=dynamic --with-http_slice_module --with-mail --with-mail_ssl_module --with-compat --with-file-aio --with-http_v2_module --with-http_v3_module --with-debug --with-stream_quic_module --add-module=/usr/local/src/ngx_brotli --add-module=/usr/local/src/headers-more-nginx-module-0.34 --add-module=/usr/local/src/njs/nginx --add-dynamic-module=/usr/local/src/ngx_http_geoip2_module --add-dynamic-module=/usr/local/src/ModSecurity-nginx --with-cc-opt=-I../boringssl/include --with-ld-opt='-L../boringssl/build/ssl -L../boringssl/build/crypto' |
Description
While this can not entirely be a bug, it is considered to be a problem as with the same set of code to be host by nginx, and very typical virtual host config file, the result is very different and result a broken site.
The problem:
It seems with HTTP/2 config, though HTTP_HOST is not set in fastcgi_param file, magento correctly got it and login to admin page works fine.
When HTTP/3 is enabled, trying to login to the admin page result with 404 not found. After adding HTTP_HOST to the fastcgi_param file, login to admin page works again.
Debug log in http/2 mode: (log shows it checked HTTP_HOST and worked fine.)
reuseport off 2023/04/14 16:45:23 [debug] 179874#179874: *1 http script copy: "SERVER_PROTOCOL" 2023/04/14 16:45:23 [debug] 179874#179874: *1 http script var: "HTTP/2.0" 2023/04/14 16:45:23 [debug] 179874#179874: *1 fastcgi param: "SERVER_PROTOCOL: HTTP/2.0" 2023/04/14 16:45:23 [debug] 179874#179874: *1 http script copy: "SERVER_SOFTWARE" 2023/04/14 16:45:23 [debug] 179874#179874: *1 http script copy: "nginx/" 2023/04/14 16:45:23 [debug] 179874#179874: *1 http script var: "1.23.4" 2023/04/14 16:45:23 [debug] 179874#179874: *1 fastcgi param: "SERVER_SOFTWARE: nginx/1.23.4" 2023/04/14 16:45:23 [debug] 179874#179874: *1 fastcgi param: "HTTP_HOST: demohost.com" 2023/04/14 16:45:23 [debug] 179874#179874: *1 fastcgi param: "HTTP_SEC_CH_UA: "Chromium";v="112", "Google Chrome";v="112", "Not:A-Brand";v="99"" 2023/04/14 16:45:23 [debug] 179874#179874: *1 fastcgi param: "HTTP_SEC_CH_UA_MOBILE: ?0" 2023/04/14 16:45:23 [debug] 179874#179874: *1 fastcgi param: "HTTP_SEC_CH_UA_PLATFORM: "Windows"" 2023/04/14 16:45:23 [debug] 179874#179874: *1 fastcgi param: "HTTP_DNT: 1" 2023/04/14 16:45:23 [debug] 179874#179874: *1 fastcgi param: "HTTP_UPGRADE_INSECURE_REQUESTS: 1" 2023/04/14 16:45:23 [debug] 179874#179874: *1 fastcgi param: "HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36" 2023/04/14 16:45:23 [debug] 179874#179874: *1 fastcgi param: "HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7" 2023/04/14 16:45:23 [debug] 179874#179874: *1 fastcgi param: "HTTP_SEC_FETCH_SITE: none" 2023/04/14 16:45:23 [debug] 179874#179874: *1 fastcgi param: "HTTP_SEC_FETCH_MODE: navigate" 2023/04/14 16:45:23 [debug] 179874#179874: *1 fastcgi param: "HTTP_SEC_FETCH_USER: ?1" 2023/04/14 16:45:23 [debug] 179874#179874: *1 fastcgi param: "HTTP_SEC_FETCH_DEST: document" 2023/04/14 16:45:23 [debug] 179874#179874: *1 fastcgi param: "HTTP_ACCEPT_ENCODING: gzip, deflate, br" 2023/04/14 16:45:23 [debug] 179874#179874: *1 fastcgi param: "HTTP_ACCEPT_LANGUAGE: en-AU,en;q=0.9" 2023/04/14 16:45:23 [debug] 179874#179874: *1 fastcgi param: "HTTP_SEC_GPC: 1" 2023/04/14 16:45:23 [debug] 179874#179874: *1 http cleanup add: 0000AAAADFAD77F0 2023/04/14 16:45:23 [debug] 179874#179874: *1 get rr peer, try: 1 2023/04/14 16:45:23 [debug] 179874#179874: *1 stream socket 22 2023/04/14 16:45:23 [debug] 179874#179874: *1 epoll add connection: fd:22 ev:80002005 2023/04/14 16:45:23 [debug] 179874#179874: *1 connect to unix:/var/run/php/php8.2-fpm.sock, fd:22 #2 2023/04/14 16:45:23 [debug] 179874#179874: *1 connected 2023/04/14 16:45:23 [debug] 179874#179874: *1 http upstream connect: 0 2023/04/14 16:45:23 [debug] 179874#179874: *1 posix_memalign: 0000AAAADFAE18C0:128 @16 2023/04/14 16:45:23 [debug] 179874#179874: *1 http upstream send request 2023/04/14 16:45:23 [debug] 179874#179874: *1 http upstream send request body 2023/04/14 16:45:23 [debug] 179874#179874: *1 chain writer buf fl:0 s:1392 2023/04/14 16:45:23 [debug] 179874#179874: *1 chain writer in: 0000AAAADFAD61B0 2023/04/14 16:45:23 [debug] 179874#179874: *1 writev: 1392 of 1392 2023/04/14 16:45:23 [debug] 179874#179874: *1 chain writer out: 0000000000000000 2023/04/14 16:45:23 [debug] 179874#179874: *1 event timer add: 22: 600000:9672066 2023/04/14 16:45:23 [debug] 179874#179874: *1 http finalize request: -4, "/index.php?" a:1, c:3 2023/04/14 16:45:23 [debug] 179874#179874: *1 http request count:3 blk:0 2023/04/14 16:45:23 [debug] 179874#179874: *1 http finalize request: -4, "/index.php?" a:1, c:2 2023/04/14 16:45:23 [debug] 179874#179874: *1 http request count:2 blk:0 2023/04/14 16:45:23 [debug] 179874#179874: *1 http2 frame complete pos:0000AAAADFB85342 end:0000AAAADFB85342 2023/04/14 16:45:23 [debug] 179874#179874: *1 http2 frame out: 0000AAAADFB5D510 sid:0 bl:0 len:0 2023/04/14 16:45:23 [debug] 179874#179874: *1 http2 frame out: 0000AAAADFB5D450 sid:0 bl:0 len:4 2023/04/14 16:45:23 [debug] 179874#179874: *1 http2 frame out: 0000AAAADFB5D390 sid:0 bl:0 len:18 2023/04/14 16:45:23 [debug] 179874#179874: *1 malloc: 0000AAAADFBC5130:4096 2023/04/14 16:45:23 [debug] 179874#179874: *1 SSL buf copy: 27 2023/04/14 16:45:23 [debug] 179874#179874: *1 SSL buf copy: 13 2023/04/14 16:45:23 [debug] 179874#179874: *1 SSL buf copy: 9 2023/04/14 16:45:23 [debug] 179874#179874: *1 SSL to write: 49 2023/04/14 16:45:23 [debug] 179874#179874: *1 SSL_write: 49 2023/04/14 16:45:23 [debug] 179874#179874: *1 http2 frame sent: 0000AAAADFB5D390 sid:0 bl:0 len:18 2023/04/14 16:45:23 [debug] 179874#179874: *1 http2 frame sent: 0000AAAADFB5D450 sid:0 bl:0 len:4 2023/04/14 16:45:23 [debug] 179874#179874: *1 http2 frame sent: 0000AAAADFB5D510 sid:0 bl:0 len:0 2023/04/14 16:45:23 [debug] 179874#179874: *1 delete posted event 0000AAAADFB5D6D0 2023/04/14 16:45:23 [debug] 179874#179874: *1 http run request: "/index.php?" 2023/04/14 16:45:23 [debug] 179874#179874: *1 http upstream check client, write event:0, "/index.php" 2023/04/14 16:45:23 [debug] 179874#179874: *1 http upstream request: "/index.php?" 2023/04/14 16:45:23 [debug] 179874#179874: *1 http upstream dummy handler 2023/04/14 16:45:23 [debug] 179874#179874: *1 http2 read handler 2023/04/14 16:45:23 [debug] 179874#179874: *1 SSL_read: 9 2023/04/14 16:45:23 [debug] 179874#179874: *1 SSL_read: -1 2023/04/14 16:45:23 [debug] 179874#179874: *1 SSL_get_error: 2 2023/04/14 16:45:23 [debug] 179874#179874: *1 http2 frame type:4 f:1 l:0 sid:0 2023/04/14 16:45:23 [debug] 179874#179874: *1 http2 SETTINGS frame 2023/04/14 16:45:23 [debug] 179874#179874: *1 http2 frame complete pos:0000AAAADFB85129 end:0000AAAADFB85129 2023/04/14 16:45:23 [debug] 179874#179874: *1 http upstream request: "/index.php?"
debug log in http/3 mode: it does not check HTTP_HOST and throws a 404 not found.
reuseport on 2023/04/14 16:36:05 [debug] 176081#176081: *366 http script copy: "SERVER_PROTOCOL" 2023/04/14 16:36:05 [debug] 176081#176081: *366 http script var: "HTTP/3.0" 2023/04/14 16:36:05 [debug] 176081#176081: *366 fastcgi param: "SERVER_PROTOCOL: HTTP/3.0" 2023/04/14 16:36:05 [debug] 176081#176081: *366 http script copy: "SERVER_SOFTWARE" 2023/04/14 16:36:05 [debug] 176081#176081: *366 http script copy: "nginx/" 2023/04/14 16:36:05 [debug] 176081#176081: *366 http script var: "1.23.4" 2023/04/14 16:36:05 [debug] 176081#176081: *366 fastcgi param: "SERVER_SOFTWARE: nginx/1.23.4" 2023/04/14 16:36:05 [debug] 176081#176081: *366 fastcgi param: "HTTP_SEC_CH_UA: "Chromium";v="112", "Google Chrome";v="112", "Not:A-Brand";v="99"" 2023/04/14 16:36:05 [debug] 176081#176081: *366 fastcgi param: "HTTP_SEC_CH_UA_MOBILE: ?0" 2023/04/14 16:36:05 [debug] 176081#176081: *366 fastcgi param: "HTTP_SEC_CH_UA_PLATFORM: "Windows"" 2023/04/14 16:36:05 [debug] 176081#176081: *366 fastcgi param: "HTTP_DNT: 1" 2023/04/14 16:36:05 [debug] 176081#176081: *366 fastcgi param: "HTTP_UPGRADE_INSECURE_REQUESTS: 1" 2023/04/14 16:36:05 [debug] 176081#176081: *366 fastcgi param: "HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36" 2023/04/14 16:36:05 [debug] 176081#176081: *366 fastcgi param: "HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7" 2023/04/14 16:36:05 [debug] 176081#176081: *366 fastcgi param: "HTTP_SEC_FETCH_SITE: none" 2023/04/14 16:36:05 [debug] 176081#176081: *366 fastcgi param: "HTTP_SEC_FETCH_MODE: navigate" 2023/04/14 16:36:05 [debug] 176081#176081: *366 fastcgi param: "HTTP_SEC_FETCH_USER: ?1" 2023/04/14 16:36:05 [debug] 176081#176081: *366 fastcgi param: "HTTP_SEC_FETCH_DEST: document" 2023/04/14 16:36:05 [debug] 176081#176081: *366 fastcgi param: "HTTP_ACCEPT_ENCODING: gzip, deflate, br" 2023/04/14 16:36:05 [debug] 176081#176081: *366 fastcgi param: "HTTP_ACCEPT_LANGUAGE: en-AU,en;q=0.9" 2023/04/14 16:36:05 [debug] 176081#176081: *366 fastcgi param: "HTTP_SEC_GPC: 1" 2023/04/14 16:36:05 [debug] 176081#176081: *366 fastcgi param: "demohost.com: PHPSESSID=723jbkqu7frlp38cp14997lk0r; form_key=zmjwqyKAVlg0cQkx; mage-cache-storage={}; mage-cache-storage-section-invalidation={}; mage-cache-sessid=true; mage-messages=; recently_viewed_product={}; recently_viewed_product_previous={}; recently_compared_product={}; recently_compared_product_previous={}; product_data_storage={}; PHPSESSID=723jbkqu7frlp38cp14997lk0r" 2023/04/14 16:36:05 [debug] 176081#176081: *366 http cleanup add: 0000AAAB049A8CF0 2023/04/14 16:36:05 [debug] 176081#176081: *366 get rr peer, try: 1 2023/04/14 16:36:05 [debug] 176081#176081: *366 stream socket 20 2023/04/14 16:36:05 [debug] 176081#176081: *366 epoll add connection: fd:20 ev:80002005 2023/04/14 16:36:05 [debug] 176081#176081: *366 connect to unix:/var/run/php/php8.2-fpm.sock, fd:20 #367 2023/04/14 16:36:05 [debug] 176081#176081: *366 connected 2023/04/14 16:36:05 [debug] 176081#176081: *366 http upstream connect: 0 2023/04/14 16:36:05 [debug] 176081#176081: *366 posix_memalign: 0000AAAB04974010:128 @16 2023/04/14 16:36:05 [debug] 176081#176081: *366 http upstream send request 2023/04/14 16:36:05 [debug] 176081#176081: *366 http upstream send request body 2023/04/14 16:36:05 [debug] 176081#176081: *366 chain writer buf fl:0 s:1760 2023/04/14 16:36:05 [debug] 176081#176081: *366 chain writer in: 0000AAAB049A8150 2023/04/14 16:36:05 [debug] 176081#176081: *366 writev: 1760 of 1760 2023/04/14 16:36:05 [debug] 176081#176081: *366 chain writer out: 0000000000000000 2023/04/14 16:36:05 [debug] 176081#176081: *366 event timer add: 20: 600000:9114508 2023/04/14 16:36:05 [debug] 176081#176081: *366 http finalize request: -4, "/index.php?" a:1, c:3 2023/04/14 16:36:05 [debug] 176081#176081: *366 http request count:3 blk:0 2023/04/14 16:36:05 [debug] 176081#176081: *366 http finalize request: -4, "/index.php?" a:1, c:2 2023/04/14 16:36:05 [debug] 176081#176081: *366 http request count:2 blk:0 2023/04/14 16:36:05 [debug] 176081#176081: *363 delete posted event 0000AAAB048F6068 2023/04/14 16:36:05 [debug] 176081#176081: *363 quic push handler 2023/04/14 16:36:05 [debug] 176081#176081: *363 post event 0000AAAB048F6068 2023/04/14 16:36:05 [debug] 176081#176081: *363 quic output hs packet max:1252 min:0 2023/04/14 16:36:05 [debug] 176081#176081: *363 quic frame tx hs ACK n:0 delay:0 4-3 2023/04/14 16:36:05 [debug] 176081#176081: *363 quic packet tx hs bytes:5 need_ack:0 number:4 encoded nl:1 trunc:0x4 2023/04/14 16:36:05 [debug] 176081#176081: *363 update posted event 0000AAAB048F6068 2023/04/14 16:36:05 [debug] 176081#176081: *363 quic output app packet max:1202 min:0 2023/04/14 16:36:05 [debug] 176081#176081: *363 quic frame tx app HANDSHAKE DONE 2023/04/14 16:36:05 [debug] 176081#176081: *363 quic frame tx app NEW_TOKEN 2023/04/14 16:36:05 [debug] 176081#176081: *363 quic frame tx app NEW_CONNECTION_ID seq:1 retire:0 len:20 2023/04/14 16:36:05 [debug] 176081#176081: *363 quic frame tx app STREAM id:0x3 off:0 len:1 2023/04/14 16:36:05 [debug] 176081#176081: *363 quic frame tx app STREAM id:0x3 off:1 len:8 2023/04/14 16:36:05 [debug] 176081#176081: *363 quic frame tx app ACK n:0 delay:0 6-5 2023/04/14 16:36:05 [debug] 176081#176081: *363 quic packet tx app bytes:113 need_ack:1 number:0 encoded nl:1 trunc:0x0 2023/04/14 16:36:05 [debug] 176081#176081: *363 sendmsg: 181 of 181 2023/04/14 16:36:05 [debug] 176081#176081: *363 quic congestion send if:0 2023/04/14 16:36:05 [debug] 176081#176081: *363 quic congestion send if:0 2023/04/14 16:36:05 [debug] 176081#176081: *363 quic congestion send if:131 2023/04/14 16:36:05 [debug] 176081#176081: *363 event timer: 15, old: 8536480, new: 8536508 2023/04/14 16:36:05 [debug] 176081#176081: *363 quic lost timer pto:92 2023/04/14 16:36:05 [debug] 176081#176081: *363 event timer add: 15: 92:8514600 2023/04/14 16:36:05 [debug] 176081#176081: *363 quic state: send:21972 pto:92 2023/04/14 16:36:05 [debug] 176081#176081: *363 delete posted event 0000AAAB048F6068 2023/04/14 16:36:05 [debug] 176081#176081: *363 quic push handler 2023/04/14 16:36:05 [debug] 176081#176081: *363 quic state: send:21972 pto:92 2023/04/14 16:36:05 [debug] 176081#176081: *366 http upstream request: "/index.php?" 2023/04/14 16:36:05 [debug] 176081#176081: *366 http upstream dummy handler 2023/04/14 16:36:05 [debug] 176079#176079: *368 SSL ALPN supported by client: h2
after adding HTTP_HOST to fastcgi_param file, http/3 now works fine with admin page login:
2023/04/14 17:19:43 [debug] 189115#189115: *1 fastcgi param: "SERVER_SOFTWARE: nginx/1.23.4" 2023/04/14 17:19:43 [debug] 189115#189115: *1 fastcgi param: "HTTP_SEC_CH_UA: "Chromium";v="112", "Google Chrome";v="112", "Not:A-Brand";v="99"" 2023/04/14 17:19:43 [debug] 189115#189115: *1 fastcgi param: "HTTP_SEC_CH_UA_MOBILE: ?0" 2023/04/14 17:19:43 [debug] 189115#189115: *1 fastcgi param: "HTTP_SEC_CH_UA_PLATFORM: "Windows"" 2023/04/14 17:19:43 [debug] 189115#189115: *1 fastcgi param: "HTTP_DNT: 1" 2023/04/14 17:19:43 [debug] 189115#189115: *1 fastcgi param: "HTTP_UPGRADE_INSECURE_REQUESTS: 1" 2023/04/14 17:19:43 [debug] 189115#189115: *1 fastcgi param: "HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36" 2023/04/14 17:19:43 [debug] 189115#189115: *1 fastcgi param: "HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7" 2023/04/14 17:19:43 [debug] 189115#189115: *1 fastcgi param: "HTTP_SEC_FETCH_SITE: none" 2023/04/14 17:19:43 [debug] 189115#189115: *1 fastcgi param: "HTTP_SEC_FETCH_MODE: navigate" 2023/04/14 17:19:43 [debug] 189115#189115: *1 fastcgi param: "HTTP_SEC_FETCH_USER: ?1" 2023/04/14 17:19:43 [debug] 189115#189115: *1 fastcgi param: "HTTP_SEC_FETCH_DEST: document" 2023/04/14 17:19:43 [debug] 189115#189115: *1 fastcgi param: "HTTP_ACCEPT_ENCODING: gzip, deflate, br" 2023/04/14 17:19:43 [debug] 189115#189115: *1 fastcgi param: "HTTP_ACCEPT_LANGUAGE: en-AU,en;q=0.9" 2023/04/14 17:19:43 [debug] 189115#189115: *1 fastcgi param: "HTTP_SEC_GPC: 1" 2023/04/14 17:19:43 [debug] 189115#189115: *1 http cleanup add: 0000AAAAEFD611A0 2023/04/14 17:19:43 [debug] 189115#189115: *1 get rr peer, try: 1 2023/04/14 17:19:43 [debug] 189115#189115: *1 stream socket 25 2023/04/14 17:19:43 [debug] 189115#189115: *1 epoll add connection: fd:25 ev:80002005 2023/04/14 17:19:43 [debug] 189115#189115: *1 connect to unix:/var/run/php/php8.2-fpm.sock, fd:25 #2 2023/04/14 17:19:43 [debug] 189115#189115: *1 connected 2023/04/14 17:19:43 [debug] 189115#189115: *1 http upstream connect: 0 2023/04/14 17:19:43 [debug] 189115#189115: *1 posix_memalign: 0000AAAAEFD6C8C0:128 @16 2023/04/14 17:19:43 [debug] 189115#189115: *1 http upstream send request 2023/04/14 17:19:43 [debug] 189115#189115: *1 http upstream send request body 2023/04/14 17:19:43 [debug] 189115#189115: *1 chain writer buf fl:0 s:1392 2023/04/14 17:19:43 [debug] 189115#189115: *1 chain writer in: 0000AAAAEFD628F0 2023/04/14 17:19:43 [debug] 189115#189115: *1 writev: 1392 of 1392 2023/04/14 17:19:43 [debug] 189115#189115: *1 chain writer out: 0000000000000000 2023/04/14 17:19:43 [debug] 189115#189115: *1 event timer add: 25: 600000:11732434 2023/04/14 17:19:43 [debug] 189115#189115: *1 http finalize request: -4, "/index.php?" a:1, c:3 2023/04/14 17:19:43 [debug] 189115#189115: *1 http request count:3 blk:0 2023/04/14 17:19:43 [debug] 189115#189115: *1 http finalize request: -4, "/index.php?" a:1, c:2 2023/04/14 17:19:43 [debug] 189115#189115: *1 http request count:2 blk:0 2023/04/14 17:19:43 [debug] 189115#189115: *1 http2 frame complete pos:0000AAAAEFE10342 end:0000AAAAEFE10342 2023/04/14 17:19:43 [debug] 189115#189115: *1 http2 frame out: 0000AAAAEFDE8390 sid:0 bl:0 len:0 2023/04/14 17:19:43 [debug] 189115#189115: *1 malloc: 0000AAAAEFE50130:4096 2023/04/14 17:19:43 [debug] 189115#189115: *1 SSL buf copy: 9 2023/04/14 17:19:43 [debug] 189115#189115: *1 SSL to write: 9 2023/04/14 17:19:43 [debug] 189115#189115: *1 SSL_write: 9 2023/04/14 17:19:43 [debug] 189115#189115: *1 http2 frame sent: 0000AAAAEFDE8390 sid:0 bl:0 len:0 2023/04/14 17:19:43 [debug] 189115#189115: *1 delete posted event 0000AAAAEFDE8550 2023/04/14 17:19:43 [debug] 189115#189115: *1 http run request: "/index.php?" 2023/04/14 17:19:43 [debug] 189115#189115: *1 http upstream check client, write event:0, "/index.php" 2023/04/14 17:19:43 [debug] 189115#189115: *1 http upstream request: "/index.php?" 2023/04/14 17:19:43 [debug] 189115#189115: *1 http upstream dummy handler 2023/04/14 17:19:43 [debug] 189115#189115: *1 http2 read handler
default magento 2.4.6 .htaccess
RewriteEngine on RewriteCond %{REQUEST_URI} !^/pub/ RewriteCond %{REQUEST_URI} !^/setup/ RewriteCond %{REQUEST_URI} !^/update/ RewriteCond %{REQUEST_URI} !^/dev/ RewriteRule .* /pub/$0 [L] DirectoryIndex index.php
typical magento 2.4.x ssl site settings:
web/seo/use_rewrites - 1 web/unsecure/base_url - https://demohost.com/ web/unsecure/base_static_url - web/unsecure/base_media_url - web/secure/base_url - https://demohost.com/ web/secure/use_in_frontend - 1 web/secure/use_in_adminhtml - 1 web/secure/base_static_url - web/secure/base_media_url - web/secure/enable_hsts - 0 web/secure/enable_upgrade_insecure - 0 web/url/redirect_to_base - 0 web/cookie/cookie_path - web/cookie/cookie_domain - web/cookie/cookie_httponly - 1
virtual host config file:
server { listen 80; listen [::]:80; server_name demohost.com www.demohost.com; return 301 https : // demohost.com$request_uri; } server { listen 443 quic default_server reuseport; listen 443 ssl http2; listen [::]:443 quic; listen [::]:443 ssl http2; server_name demohost.com; ssl_protocols TLSv1.2 TLSv1.3; add_header alt-svc 'h3=":443"; ma=86400, h3-29=":443"; ma=86400' always; set $MAGE_ROOT /var/www/magento2; #set $MAGE_MODE production; set $MAGE_DEBUG_SHOW_ARGS 0; ssl_certificate /etc/letsencrypt/fullchain.pem; ssl_certificate_key /etc/letsencrypt/privkey.pem; ssl_trusted_certificate /etc/letsencrypt/chain.pem; access_log /var/log/nginx/m2-access.log quic; error_log /var/log/nginx/m2-error.log debug; include /var/www/magento2/nginx.conf.sample; }
github com /magento/magento2/blob/2.4-develop/nginx.conf.sample
Due to differences in HTTP/2 and HTTP/3 implementations, it is handled different.
While you didn't site the relevant info, hereby I assume the request is made using the ":authority" pseudo-header, as it usually happens.
In the HTTP/3 implementation the ":authority" pseudo-header is handled different to HTTP/2.
While in HTTP/2 it is assumed to be equivalent to the "Host" header (to address legacy of previous HTTP versions, arguably not correct), and hence it's passed as the HTTP_HOST fastcgi parameter, in HTTP/3 the ":authority" header is handled as is, as a distinct header.
HTTP_HOST is used to match the client Host header, see http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#parameters for details, this is why it doesn't work automagically using HTTP/3.
If you want to pass something in what happens to be HTTP_HOST, you might want to manually adjust it (or use another fastcgi param) to the $host variable instead.
Basically, this is similar to what happens with in HTTP/1.x when the host comes in the request line itself.
I barely see how this can be improved in the HTTP/3 implementation. The only viable solution I'd rather ponder is probably stop equating ":authority" and "Host" in HTTP/2, to make things clear. This would also improve things in adjacent areas such as detecting duplicate headers with different values (RFC 9113, section 8.3.1).