The first Ubuntu user to create a web server and get confused with best practices. Should I configure it in var / www / site / public or somewhere else?
What is the best way to grant permissions? This is what I found:
sudo adduser www-data (yourgroup) sudo chgrp (your group) /var/www sudo chmod –R 775 /var/www ***( or would 774 be better)*** sudo chmod g+s /var/www
That way, I could set up a group to add people at a later date. It is not possible to add files anywhere, but in my user folder, I know that this is not the right place and I would like to start everything correctly.
source share