mirror of
https://github.com/YunoHost-Apps/ampache_ynh.git
synced 2024-09-03 18:15:55 +02:00
Merge pull request #13 from stevenroose/fix-nonroot
Fix error in nginx.conf regarding non-root installations
This commit is contained in:
commit
12592901e6
3 changed files with 6 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
|||
location PATHTOCHANGE {
|
||||
location PATHTOCHANGE/ {
|
||||
|
||||
alias ALIASTOCHANGE;
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue