#2514 closed task (invalid)

Is there any config where i can configure nginx to supoort file upload using http3

Reported by: Karthikdasari0423@… Owned by:
Priority: trivial Milestone:
Component: http/3 Version: 1.19.x
Keywords: this is a question and need help in nginx conf file Cc:
uname -a: root@ubuntu:~# uname -a
Linux ubuntu 5.15.0-75-generic #82-Ubuntu SMP Tue Jun 6 23:10:23 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
root@ubuntu:~#
nginx -V: root@ubuntu:~# nginx -V
nginx version: nginx/1.23.4 (nginx-quic)
built by gcc 11.3.0 (Ubuntu 11.3.0-1ubuntu1~22.04.1)
built with OpenSSL 1.1.1 (compatible; BoringSSL) (running with BoringSSL)
TLS SNI support enabled
configure arguments: --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-compat --with-debug --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_sub_module --build=nginx-quic --with-debug --with-http_v3_module --with-cc-opt=-I/src/boringssl/include --with-ld-opt='-L/src/boringssl/build/ssl -L/src/boringssl/build/crypto'
root@ubuntu:~#

Description

I tried below config but still getting error with curl
am i missing anything here

location / {

# required for browsers to direct them into quic port
add_header Alt-Svc 'h3=":$server_port"; ma=86400';
#add_header Alt-Svc 'h3=":8443"; ma=86400';

# signal whether we are using QUIC+HTTP/3
add_header X-protocol $server_protocol always;

}

location "/root/([0-9a-zA-Z-.]*)$"{

proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_set_header Host $host;
dav_methods PUT DELETE MKCOL COPY MOVE;
client_body_temp_path /tmp;
alias /root/$1;
create_full_put_path on;
dav_access group:rw all:r;
client_body_in_file_only on;
client_body_buffer_size 100M;
client_max_body_size 100M;
proxy_pass_request_headers on;
proxy_set_body $request_body_file;
proxy_pass http://127.0.0.1/root/;
proxy_redirect off;

}

error_page 405 =200 $uri;

}

}

Curl output

  • We are completely uploaded and fine

< HTTP/3 404
< server: nginx/1.23.4
< date: Tue, 20 Jun 2023 19:28:53 GMT
< content-type: text/html
< content-length: 153
< x-protocol: HTTP/3.0
<
<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.23.4</center>
</body>
</html>

  • Connection #0 to host 172.16.3.1 left intact

root@ubuntu:/var/www/html#

Could someone please help me with the nginx config to upload a file using curl.

Change History (1)

comment:1 by Maxim Dounin, 10 months ago

Resolution: invalid
Status: newclosed

For questions, please use support options available. Thanks.

Note: See TracTickets for help on using tickets.