I've always struggled with various paths
for nginx
files and where they should be positioned. As we know, we can change where we can park both the www directories for our web app
, as well as the associated log
files.
The issue that I've found is that I have bash
and Ruby
user scripts both for SSH
calls as well as crontab
scripts that need access to various parts of these nginx
files, as well as scheduled network copies of various files, not to mention updates to these files.
I have adhered to the static paths recommended by the package installation of nginx
in various distros, however I've often run into permissions
issues as the path
was not optimal with regards to accessibility. So I would research the various main linux
paths and choose something that was designed with all this in mind, while maintaining a good level of security. I've seen various locations, and now that I'm onto this again (crontabs
not working, permissions
issues on various items, etc.), I thought I'd ask where all this should be located.
My apps are not standard static
html applications. I have a Rack
application with an app server
running, a Gemfile
, as well as any incoming uploads, etc.
The two locations that I'm assessing are:
However...this is what I read for the /usr
directory:
/usr is the second major section of the filesystem. /usr is shareable, read-only data. That means that /usr should be shareable between various FHS-compliant hosts and must not be written to. Any information that is host-specific or varies with time is stored elsewhere.
Large software packages must not use a direct subdirectory under the /usr hierarchy.
So I'm lost. Can anybody recommend a location for readable/writable files that will give me minimal hassle trying to script and cron
?