From 9000ee6b6591f1081e11a95b5e1748a40f578908 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Thu, 2 Nov 2017 10:19:28 -0400 Subject: [PATCH] argh, closer but no cookie still cannot get apache liking the folder. but this is really close. --- scripts/system/add_apache_site.sh | 48 ++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 11 deletions(-) diff --git a/scripts/system/add_apache_site.sh b/scripts/system/add_apache_site.sh index a9c21f92..fbbe2a00 100644 --- a/scripts/system/add_apache_site.sh +++ b/scripts/system/add_apache_site.sh @@ -34,19 +34,45 @@ function write_apache_config() local full_path="${BASE_PATH}/${appname}${STORAGE_SUFFIX}" echo really full path is $full_path -#no, bad! the public folder will be a link. -# will apache be happy if the site folder doesn't exist yet? -# # make the storage directory if it's not already present. -# if [ ! -d "$full_path" ]; then -# mkdir -p "$full_path" -# if [ $? -ne 0 ]; then -# echo "Failed to create the storage directory for $appname in" -# echo "the folder: $full_path" -# exit 1 -# fi -# fi +#hmmm: the code below is just getting bigger. it would be nice to create the chunks of permission stuff +# via iteration rather than hardcoding. echo " +# we have to enable some directory access through the user's folders. +# this is probably going to end up repeated in multiple apache files, but +# hopefully that's not a problem. +#hmmm: fix above note if it's not a problem. +# +# set permissions on the root folders. + + Options -ExecCGI +Indexes +FollowSymLinks +Includes + Order allow,deny + Allow from all + +# set permissions on the root of the home folders. + + Options -ExecCGI +Indexes +FollowSymLinks +Includes + Order allow,deny + Allow from all + +# set permissions on the user's home folder. + + Options -ExecCGI +Indexes +FollowSymLinks +Includes + Order allow,deny + Allow from all + +# set permissions on the user's app storage folder. + + Options +ExecCGI +Indexes +FollowSymLinks +Includes +MultiViews + Order allow,deny + Allow from all + +# set permissions on the actual app folder. + + Options +ExecCGI +Indexes +FollowSymLinks +Includes +MultiViews + Order allow,deny + Allow from all + ServerName ${sitename} # ServerAlias ${sitename} *.${sitename} -- 2.34.1