I've just rebuilt a Pi2 from Stretch to Buster (by replacing the SD card), and now I can't get Apache2 to work properly.
On the basic install it is OK, the index page in /var/www comes up as expected. However, I'm running all my web stuff from a locally mounted disc (/media/extdisc1)
I've made a copy of /etc/apache2/sites-available/000-default.conf and altered the DocumentRoot field to :
and restarted the apache2 service. Now I get :
You don't have permission to access this resource.
Apache/2.4.38 (Raspbian) Server at 192.168.1.118 Port 80
I've checked the file permissions, and the php file that I'm trying to read has :
-rw-r--r-- webuser www-data
I've also got an index.html file in the same directory, with the same permissions, and I can't read that either, so I don't think this is a PHP problem.
Looking up the file tree, /media is drwxr-xr-x root root
/media/extdisc1 is the same
/media/extdisc1/webstuff is drwxr-xr-x webuser www-data
so as far as I can see, the file permissions/ownerships are OK.
As the user pi (and webuser), I am able to access the files via the command line.
From what I've been able to dig up on various websites, that seems to cover all bases, but I'm still not able to move forward.