In the past I have used two methods for securing files for web apps.
- Put them outside of webroot (which is usually {www || http}/app). So files would usually be stored outside apache altogether.
OR
- Restrict access within my .htaccess file
My friend suggested another alternative which is similar to option 1 but allows all files to remain together. He suggested that when setting up my virtual host I adjust the path to {www || http}/app/public.
This option would allow me to store all related files in {www || http}/app and just store all private files in {www || http}/app/private
Should there be any concerns with this method?
.../app/public
instead of.../app
) and then having the private files outside the webroot - i.e. exactly the same as option 1, only with a different webroot?