nginx conf file for downloading a text file.

HARISH KUMAR Ivaturi harishkumarivaturi at
Wed Jan 20 13:34:12 UTC 2021

Hi All,

I would like to know where I went wrong on writing the nginx.conf file for
downloading addDevice.txt file which is located at

I used curl command as follows:

curl -k -v --http3 "https://localhost:8443/files/addDevice.txt"
curl -k -v --http3 "https://localhost:8443/static/addDevice.txt"

But did not get any response.

the nginx.conf file is as follows :

worker_processes auto;
events {
worker_connections 1024;

http {
include /etc/nginx/sites-available/*;
log_format quic '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" "$quic" "$http3"';

access_log logs/access.log quic;

server {
listen 8443 ssl;
listen 8443 http3;
ssl_protocols TLSv1.3 TLSv1.2;
client_max_body_size 10M;

ssl_certificate /home/ubuntu/nginxcertsimp/cert.crt;
ssl_certificate_key /home/ubuntu/nginxcertsimp/cert.key;

location / {
            proxy_set_header Host $http_host;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_redirect off;
            proxy_buffering off;
            proxy_pass https://localhost;
location /static {
            root /var/www/files/addDevice.txt;

add_header Alt-Svc '$http3=":8443"; ma=86400';


Please help me with this so that i can get total time of downloading a file
using curl --write-out command.

Best Regards
Harish Kumar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx-devel mailing list