This is what I'm trying to do: change the default directory of apache2 from /var/www/html to /media/pi/storage/root_folder/
I have followed this tutorial > https://help.ubuntu.com/community/ApacheMySQLPHP#Virtual_Hosts
under section virtual hosts, I created a test html at /home/pi/Desktop/ and it works because of correct permissions.
Now when I do the exact same thing at /media/pi/storage/root_folder/ and reload the webpage, I get forbidden error message, suggesting that I have permission issues on my hard drive.
Will something like this work?
sudo chown -R USER:USER /media/pi/storage/root_folder/
And finally, how do I get these permissions to be applied for any new subdirectories and files in the future so that I don't run into the same forbidden error ever again?
I appreciate any help, thanks guys..
ps aux | grep apache2
:root 469 0.0 0.4 7716 4044 ? Ss 03:18 0:00 /usr/sbin/apache2 -k start
www-data 470 0.0 0.3 230116 3500 ? Sl 03:18 0:00 /usr/sbin/apache2 -k start
www-data 471 0.0 0.3 230116 3500 ? Sl 03:18 0:00 /usr/sbin/apache2 -k start
pi 994 0.0 0.0 4344 552 pts/0 S+ 03:27 0:00 grep --color=auto apache2
pi adm dialout cdrom sudo audio video plugdev games users input netdev gpio i2c spi