Answer the question
In order to leave comments, you need to log in
Is it possible for Nginx to control file sharing?
There is a server on NodeJS, one of the functions of which is to give files. There is a problem when downloading from remote locations with a bad link. For users, the file is downloaded, but not finalized by the browser.
As a solution, I came up with using Nginx, but now the file just hangs in a constant download.
How to properly configure it to distribute files?
Answer the question
In order to leave comments, you need to log in
if it's just about setting up nginx as a reverse proxy, here's an example
(there is an audio folder inside the application folder, which we want to give through nginx)
server {
server_name example.com;
location /audio/ {
root /path/to/appfolder;
}
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question