[NBLUG/talk] FHS and webapps

Mark Street jet at sonic.net
Tue Nov 19 14:06:12 PST 2013


On 11/17/2013 7:31 PM, Kendall Shaw wrote:
> The filesystem hierarchy standard seems to say that files for a 
> website should be placed in /srv. Serving images for PXE from /srv 
> seems to make sense to me.
> But... HTTP serves resources which are not files any more than an 
> executable is a file. And there isn't only one network program on a 
> computer serving HTTP, usually.
>
> So, of course, you can put webapps whereever you want. But, for the 
> sake of knowing where a distribution or a vendor should not put files, 
> where do you think a locally developed webapp's component files should 
> be located?

The key words are "locally developed webapp".  Technically you can serve 
files from just about anywhere on the filesystem.  The rub comes in when 
and if you install a package from a distro or vendor and it clobbers 
your existing web app(s).  That is why the FHS is so strict in this 
respect... it is protecting you from others... and trying to make it 
easy for other users to find the files they need in a defined location 
on the filesystem.

The FHS can be clear as mud on this one and sometimes seems to 
contradict itself.... "put it there but don't put anything in it"....

If you are sold on /srv as your root something like - /srv/www/local/htdocs

I have seen some locally developed web apps placed in the root of /opt 
as well.

Personally I tend to mostly use /opt these days for locally developed 
and manually installed apps since it is fairly open and does not get 
polluted with package installations from distros and packagers.

Ultimately it is your call.  Use the FHS as a guide but don't let it 
rule you.....

> I think it would not be these places:
>
> The dump:
> /usr/local
>
> Distro files:
> /usr
>
> Vendor files:
> /opt
>
> Files for file transfer protocols:
> /srv
>
> Transient files:
> /var
>
> Kendall
>



More information about the talk mailing list