I have some large image directories for a webcam site. The directories are in this path /var/www/boulderflatironcam.com/public_html/ on the server. The web root was laid out on the droplet’s 40GB disk and I was expecting the block storage to just extend this disk. I started rsyncing files from another server and filled up the main disk. It looks like it comes up as an attached storage device. Do I need to move the whole web directory to the new storage or is there a way to put just certain directories on the block storage? Or, is there a way to just have the block storage extend the basic server disk?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
It’s is also possible to do this using Nginx’s simularly named alias directive. Again, let’s say your storage volume is mounted at
/mnt/volume-nyc1-01
and that you wanthttp://example.com/images
to be served from the volume. First, you would need to create a directory on the volume that you can give ownership to thewww-data
user. E.g:Then you’ll need to edit your Nginx’s configuration. By default, that is found at
/etc/nginx/sites-enabled/default
. Now add an alias directive pointing/images
to/mnt/volume-nyc1-01/images
:Finally, restart Apache for the changes to take effect:
Hi All, We have followed this documentation, unfortunately we are not able to connect volume that we have created from Snapshot from Droplet.
When we tried the following command which is giving following result. ls -lsh 64K drwxrwsr-x 2 www-data www-data 60K Apr 1 04:25 payum 0 lrwxrwxrwx 1 www-data www-data 27 Jun 3 2018 public -> /mnt/volumes-ams3/public/
We would like to connect that public folder to the volume that we have created recently. mnt/volumes-ams3 was created to used in different Droplet.
How can we change it to point to our volume ?
Appreciate your help.
You can use Apache’s Alias directive to point a path to a specific directory outside of your web root. For example, let’s say your storage volume is mounted at
/mnt/volume-nyc1-01
and that you wanthttp://example.com/images
to be served from the volume. First, you would need to create a directory on the volume that you can give ownership to thewww-data
user. E.g:Then you’ll need to edit your Apache configuration. By default, that is found at
/etc/apache2/sites-enabled/000-default.conf
. Now add an Alias directive pointing/images
to/mnt/volume-nyc1-01/images
:Finally, restart Apache for the changes to take effect:
You can find out more details about how Block Storage volumes work in this tutorial: https://www.digitalocean.com/community/tutorials/how-to-use-block-storage-on-digitalocean