Share apache2 webserver directory as network share

sudo su
apt install samba
nano /etc/samba/smb.conf
[global]
   workgroup = WORKGROUP
   server string = %h server (Samba, Ubuntu)
;   interfaces = 127.0.0.0/8 eth0
;   bind interfaces only = yes
   log file = /var/log/samba/log.%m
   max log size = 1000
   logging = file
   panic action = /usr/share/samba/panic-action %d
   server role = standalone server
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   pam password change = yes
   map to guest = bad user
   usershare allow guests = no

[www]
   comment = Webserver Root
   path = /var/www
   read only = no
   browseable = yes
   force user = www-data
   force group = www-data
   create mask = 0664
   directory mask = 2775
systemctl restart smbd
smbpasswd -a <username>

<username> must exist in the system