Here is an example of the file structure of a Linux distro: https://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-filesystem-fhs.html
Each directory has a specific purpose, and seems like a web application should be distributed in different directories rather than being encapsulated in a folder.
The initial structure of my web app is as follows:
/home/username/appname/appsource... /home/username/appname/appconfiguration... /home/username/appname/apptempdata... /home/username/appname/applogdata... /home/username/appname/appdata... /home/username/public_html/appname/appsite/...
The application was initially placed in an user folder just because that's where the web app started developing through certain web tool, but now is needed to break away the app from the web tool and from the server user, and is needed to create an installation method (in the end different admin users of a given Linux server will rotate to manage the application files if given permission in the Linux system).
From what I researched (see the FHS specifications), I understand that the app files have to be redistributed as follows:
/usr/lib/appname/appsource... /etc/appname/appconfiguration... /var/www/html/appname/appsite... /var/tmp/appname/apptempdata... /var/log/appname/applogdata... /var/lib/appname/appdata...
If I was to just make things work now, I would just place everything in the /var/lib and /var/www/html directories:
/var/lib/appname/appsource... /var/lib/appname/appconfiguration... /var/www/html/appname/appsite... /var/lib/appname/apptempdata... /var/lib/appname/applogdata... /var/lib/appname/appdata...
Should I do that? If not then please explain what are the main reasons, and how should the example files be located?