Things to do after an apache installation in your *nix system
If you add yourself to group www-data to allow you to write to /var/www/ that implies you are giving the group www-data write access to /var/www/
That means apache can write to /var/www.
Which means your web site has write access to your code. This is insecure and will likely get your server owned.
If you are the only developer, why not just make the owner of /var/www/ you?