2020-01-14 - This solution is included in nethserver-httpd-virtualhosts-3.7.4
- update your system
Hi Dominik,
I assume you need it for one vhost and not for all.
mkdir -p /etc/e-smith/templates-custom/httpd/vhost-extra/
Create /etc/e-smith/templates-custom/httpd/vhost-extra/30directory20optionsFollowSymlinks
with following content:
# 30directory20optionsFollowSymlinks
{
use esmith::ConfigDB;
my $vdb = esmith::ConfigDB->open_ro('vhosts') || die("Can't open vhosts db");
my $FollowSymlinks = $vdb->get_prop("$VhostName",'FollowSymlinks') || 'disabled';
$OUT .= " Options +FollowSymLinks\n" if ($FollowSymlinks eq 'enabled');
}
Set FollowSymlinks to enabled and expand the template:
db vhosts setprop YOURVHOST FollowSymlinks enabled
expand-template /etc/httpd/conf.d/virtualhosts.conf
Stolen from here:
Documentation:
http://docs.nethserver.org/projects/nethserver-devel/en/v7/templates.html#subdirectory-templates