Before story:
We had a vserver with a domain around year 2004-2007 with apache. My father was owner and I was learning little bit from his friend (he was doing that stuff). I learned how to use linux via putty. I think we used there a system which was called confixx. There we had a linux user account which was "web1" there in /home folder with a html folder in it and all web stuff was there.
These days I use nginx and if I read articles they write always about "/var/www/" and "www-data" user. I even found an article which writes about www/web1 www/web2. It makes sense for me because sometimes I even have permission problems. Example if I upload file via php script it cannot move file because it belongs to www-data ( even if web1 has www-data group). I needed to change php config to that username.
How I do my setup:
Most time a vserver comes with a crazy domain like vserver1234.yourniceserver.com. I create subdomain or normal domain and the root html is under
- /home/web1/sites/nameofthedomain/html
- /home/web1/sites/nameofthedomain/subdomain/name/html
- /home/web2/html its a special single domain.
I use my vserver most time to test things around, for own written fileshare system and wordpress-blog.
So the question is:
- Did I all these years wrong?
- Should I move that to "/var/www" folder?
- If yes, it possible to use to create web1 user or need these folders to be owner of root? Because every user like web1, web2 can use ftp.
Edit: I use debian.