Private Files

Despite the tradeoffs in performance, and the inability to aggregate Javascript and CSS, I still like the idea of private files. The advantage of using the Drupal permissions system (and the CMS to manage files) outweight the slight, in my case, degradation in speed.

That said, I have nginx running on a flat file-serving VPS, and would like to have some static content served from that server instead of the separate, Drupal server. These are my notes on how to do that.

    • do I need a reverse proxy setup? The files are currently served from the justagwailo.com domain.

    • if not, can I use a subdomain? static.justagwailo.com currently points to an Amazon S3 bucket hosting some video. I like the idea of using S3 to host static content, but would also like to know how to run my own file server.

      • if I were to use a subdomain, how would you use Drupal's upload system to keep store then keep track of it?

      • file permissions would need to be granted to something (Drupal itself? SFTP?) and the fully qualified URL either stored in the database or generated on the fly (or cached)