0

I know there's a wealth of Apache documentation, but I can't seem to find the answer.

With the default documentroot - /var/www/html - all is fine. Permissions are - drwxr-xr-x 2 root root 4096 Feb 21 19:06 html/. Permissions for the file within this are: -rw-r--r-- 1 root root 10918 Feb 21 19:06 index.html

When I change the documentroot to /mnt/mounty/testing it no longer works ("Forbidden..."). Permissions for the directory look identical

drwxr-xr-x 2 root  root  4096 Jan 24 18:53 testing/

The html file within this has same owner / group and even more liberal permissions (yes I know not to 777 but this is a local test).

-rwxrwxrwx 1 root  root 39806 Jan 24 18:38 index.html*

What am I doing wrong? I've restarted Apache at every change. The parent folders of the original doc root and the new one are different - but surely this can't matter?

Roger06
  • 133
  • Does this answer your question? Web content not reachable – vidarlo Feb 27 '20 at 20:32
  • https://askubuntu.com/questions/1166100/what-permissions-does-documentroot-directory-of-apache-server-requies-if-its-ou/1166141#1166141 is also a good candidate. – vidarlo Feb 27 '20 at 20:32
  • @vidarlo Those don't answer the question because this is not a permission issue. I believe you need to edit your conf file when changing the document root. Here is an answer. – mchid Feb 27 '20 at 21:46
  • Also, I'm pretty sure you can work around this by creating a simlink to the desired location from within the default document root (or by making the default document root a simlink to the desired location but it's been a while so I haven't tested this recently). – mchid Feb 27 '20 at 21:48
  • @vidarlo. Thanks for the links. The problem there is exactly the same - but the solution still does not work. The new path has exactly the same permissions as the old one but still no joy. I'll keep experimenting. – Roger06 Feb 28 '20 at 09:28

0 Answers0