Report this

What is the reason for this report?

How can i add a second drive to nginx server?

Posted on September 16, 2016

I have a server having two drives each of 2TB. First drive is mounted to “root” (which is called “/”) and the second drive is mounted to /mnt/disk1. I am serving my files from first hard drive at location /usr/share/nginx/html/downloads/ with this default configuration below:

root /usr/share/nginx/html; <---------------default served file location index index.html index.htm; server_name localhost;

location / { try_files $uri $uri/ =404;
}
}

My files can be downloaded at http://ip_address/downloads/softwares/example.exe

Now my first 2TB hard drive is filled and i dont have budget to buy another server. But i have another 2TB of hard drive having all of its 2TBfree space mounted at /mnt/disk1.

Can you please tell me how can i tell nginx to include that 2TB drive so that i can put and serve files from this 2TB drive at location /mnt/disk1

ubuntu nginx web-server ubuntu-14.04

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.