Wrong Information in article
Dear Digital Ocean
I just read through this site, which is still high up on the first page of google results, but seriously contains something you should wanna change. The page is this one:
https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-16-04 (yes it’s old but still valid and as it’s high up on google, it’s just wrong information and important to adjust)
The change to make there is about the file and folder permissions inside /var/www/html at two lines looking like this:
sudo chown -R $USER:$USER /var/www/html/somedirectory
You say to change the owner and group to the username which is really stupid. You should add the current user to the www-data group instead! Otherwise it’s simply wrong and damaging a lot of applications that will simply not run if the files and folders belong to the user, there’s a reason for the www-data user and group!!! Please adjust the page, or remove it.