Skip to content

Commit

Permalink
Merge pull request #13 from stevenroose/fix-nonroot
Browse files Browse the repository at this point in the history
Fix error in nginx.conf regarding non-root installations
  • Loading branch information
beudbeud committed Sep 9, 2015
2 parents cd3c018 + 035ca11 commit 1259290
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions conf/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
location PATHTOCHANGE {
location PATHTOCHANGE/ {

alias ALIASTOCHANGE;

Expand All @@ -17,12 +17,12 @@ location PATHTOCHANGE {
fastcgi_param SCRIPT_FILENAME $request_filename;
}

location ^~ /bin/ {
location ^~ PATHTOCHANGE/bin/ {
deny all;
return 403;
}

location ^~ /config/ {
location ^~ PATHTOCHANGE/config/ {
deny all;
return 403;
}
Expand All @@ -35,7 +35,7 @@ location PATHTOCHANGE {
rewrite ^PATHTOCHANGE/rest/(.*)\.view$ PATHTOCHANGE/rest/index.php?action=$1 last;
rewrite ^PATHTOCHANGE/rest/fake/(.+)$ PATHTOCHANGE/play/$1 last;
}
location /rest {
location PATHTOCHANGE/rest {
limit_except GET POST {
deny all;
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/install
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ sudo sed -i "s@RANDOMKEYTOCHANGE@$random_key@g" $final_path/config/ampache.cfg.p
sudo chown -R www-data: $final_path

# Modify Nginx configuration file and copy it to Nginx conf directory
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf*
sed -i "s@PATHTOCHANGE@${path%/}@g" ../conf/nginx.conf*
sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf*
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/ampache.conf

Expand Down
2 changes: 1 addition & 1 deletion scripts/upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ sudo sed -i "s@DOMAINTOCHANGE@$domain@g" $final_path/config/ampache.cfg.php
sudo chown -R www-data: $final_path

# Modify Nginx configuration file and copy it to Nginx conf directory
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf*
sed -i "s@PATHTOCHANGE@${path%/}@g" ../conf/nginx.conf*
sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf*
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/ampache.conf

Expand Down

0 comments on commit 1259290

Please sign in to comment.