diff --git a/bin/compile b/bin/compile index cb3d81276..37252f5b8 100755 --- a/bin/compile +++ b/bin/compile @@ -36,7 +36,7 @@ status "Copying project files into public/" mkdir -p $cache_dir/public mv $root_dir/* $cache_dir/public mv $cache_dir/public . -# [[ -f public/Procfile ]] && mv public/Procfile . +mv public/Staticfile* . status "Setting up nginx" tar xzf $compile_nginx_tgz @@ -46,9 +46,9 @@ cp -f $compile_buildpack_dir/conf/mime.types nginx/conf/mime.types [[ -f $build_dir/public/nginx.conf ]] && mv $build_dir/public/nginx.conf nginx/conf/nginx.conf [[ -f $build_dir/public/mime.types ]] && mv $build_dir/public/mime.types nginx/conf/mime.types -if [[ -f public/Staticfile.auth ]]; then +if [[ -f Staticfile.auth ]]; then status "Enabling basic authentication" - mv public/Staticfile.auth nginx/conf/.htpasswd + mv Staticfile.auth nginx/conf/.htpasswd cat nginx/conf/.htpasswd | indent echo protip "Learn about basic authentication" "https://github.com/drnic/staticfile-buildpack#basic-authentication" @@ -60,9 +60,8 @@ if [[ "$(grep directory: Staticfile)X" != "X" ]]; then touch nginx/conf/.enable_directory_index fi +# [[ -f public/Procfile ]] && mv public/Procfile . # echo "-----> Ensuring manifest.yml & stackato.yml aren't available in public/" # rm -f public/{manifest,stackato}.yml -rm -f public/Staticfile* - cp $compile_buildpack_bin/boot.sh . diff --git a/conf/nginx.conf b/conf/nginx.conf index 059b97a6f..b79fe70fe 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -21,7 +21,7 @@ http { location / { root <%= ENV["APP_ROOT"] %>/public; index index.html index.htm Default.htm; - <% if File.exists?(auth_file = File.join(ENV["APP_ROOT"], "nginx/conf/.enable_directory_index")) %> + <% if File.exists?(File.join(ENV["APP_ROOT"], "nginx/conf/.enable_directory_index")) %> autoindex on; <% end %> <% if File.exists?(auth_file = File.join(ENV["APP_ROOT"], "nginx/conf/.htpasswd")) %>