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.htmlEach 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/appsource/...The app is encapsulated in a minimum of directories within the Linux system, one for the public source (the pages, javascript, css, website images), in the other directory (/home/username/appname/...) is the rest of the application files.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, I understand that the app files have to be redistributed as follows:/usr/lib/appname/appsource.../etc/appname/appconfiguration.../var/tmp/appname/apptempdata.../var/log/appname/applogdata.../var/lib/appname/appdata.../var/www/html/appname/appsource...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/lib/appname/apptempdata.../var/lib/appname/applogdata.../var/lib/appname/appdata.../var/www/html/appname/appsource...Should I do that? If not then please explain what are the main reasons, and how should the example files be located?
Where should be located a web application in Linux?
linux;directory structure