Skip to content

Commit

Permalink
Resolve relative paths in vvv-nginx.conf since not allowed by Nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed Mar 16, 2016
1 parent 4b538a4 commit be239ac
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions provision/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,11 @@ custom_vvv(){
# while still having an Nginx config which works.
DIR="$(dirname "$SITE_CONFIG_FILE")"
sed "s#{vvv_path_to_folder}#$DIR#" "$SITE_CONFIG_FILE" > "/etc/nginx/custom-sites/""$DEST_CONFIG_FILE"

# Resolve relative paths since not supported in Nginx root.
while grep -sqE '/[^/][^/]*/\.\.' "/etc/nginx/custom-sites/""$DEST_CONFIG_FILE"; do
sed -i 's#/[^/][^/]*/\.\.##g' "/etc/nginx/custom-sites/""$DEST_CONFIG_FILE"
done
done

# Parse any vvv-hosts file located in www/ or subdirectories of www/
Expand Down

0 comments on commit be239ac

Please sign in to comment.