Hi guys,
I run Apache 2.4.38 on Raspian Buster.
I have index.html in tempfs and is symliked into the folder holding my web content. The index.html changes a lot so I keep it off my SD card to reduce wear. The file is generated using a script. Config is as below:
cat ./website.conf
<VirtualHost *:80>
ServerAdmin me@googlemail.com
ServerName fqdnofwebsite
ServerAlias www.fqdnofwebsite
DocumentRoot /var/www/fqdnofwebsite
<Directory />
Options +ExecCGI +FollowSymlinks -SymLinksIfOwnerMatch
AllowOverride None
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
This is in sites-available and is is symlinked to the sites-enabled folder.
/var/www/fqdnofwebsite is owned by "pi:pi" and the index.html file is owned by "pi:pi" too.
From my client PC on LAN, I have a hosts file so that the name is correct in the request. When I try to hit the server the request is forbidden.
The Apache log file states:
[Tue Mar 23 22:08:37.155319 2021] [core:error] [pid 24631:tid 1884275744] [client 192.168.0.69:58177] AH00037: Symbolic link not allowed or link target not accessible: /var/www/fqdnofwebsite/index.html
The file "/var/www/fqdnofwebsite/index.html" is owned by pi:pi
Status of service shows:
apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2021-03-23 21:42:45 GMT; 28min ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 23923 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
Process: 24624 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=0/SUCCESS)
Main PID: 23927 (apache2)
Tasks: 55 (limit: 2062)
CGroup: /system.slice/apache2.service
├─23927 /usr/sbin/apache2 -k start
├─24628 /usr/sbin/apache2 -k start
└─24631 /usr/sbin/apache2 -k start
Mar 23 21:52:38 rinse systemd[1]: Reloading The Apache HTTP Server.
Mar 23 21:52:38 rinse systemd[1]: Reloaded The Apache HTTP Server.
Mar 23 21:55:31 rinse systemd[1]: Reloading The Apache HTTP Server.
Mar 23 21:55:31 rinse systemd[1]: Reloaded The Apache HTTP Server.
Can anyone please advise?