Welcome! Log In Create A New Profile

Advanced

nginx conf file for downloading a text file.

HARISH KUMAR Ivaturi
January 20, 2021 08:36AM
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
/var/www/files/addDevice.txt.

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
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

nginx conf file for downloading a text file.

HARISH KUMAR Ivaturi 275 January 20, 2021 08:36AM

Re: nginx conf file for downloading a text file.

Maxim Dounin 125 January 20, 2021 11:54AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 200
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready