diff options
author | Thomas Sarboni | 2015-07-20 00:29:55 +0200 |
---|---|---|
committer | Thomas Sarboni | 2015-07-20 00:29:55 +0200 |
commit | 10c68eaad0256c68e19d32fe6f301499a0d107d1 (patch) | |
tree | 62f77d3682c72e2a45ede01565db3531fb209ee9 | |
parent | 98431d8669083c583b3d94716f2112dd3db6807b (diff) | |
download | aur-10c68eaad0256c68e19d32fe6f301499a0d107d1.tar.gz |
Updated nginx example and install file
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 2 | ||||
-rw-r--r-- | ampache.install | 10 | ||||
-rw-r--r-- | nginx-example.conf | 17 |
4 files changed, 27 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = ampache-git pkgdesc = A PHP-based tool for managing and playing your audio/video files via a web interface pkgver = 3.8.0.beta2.25.gf946a1c - pkgrel = 5 + pkgrel = 6 url = http://www.ampache.org/ install = ampache.install arch = i686 @@ -4,7 +4,7 @@ pkgname=ampache-git _gitname=ampache pkgver=3.8.0.beta2.25.gf946a1c -pkgrel=5 +pkgrel=6 pkgdesc="A PHP-based tool for managing and playing your audio/video files via a web interface" arch=('i686' 'x86_64') url="http://www.ampache.org/" diff --git a/ampache.install b/ampache.install index ece436ee4d7c..d140698196d2 100644 --- a/ampache.install +++ b/ampache.install @@ -4,10 +4,18 @@ post_install() { need the packages specified in optdepends. Check out http://wiki.archlinux.org/index.php/Ampache and https://github.com/ampache/ampache/wiki/Transcoding for more info. -==> Please enable curl and pdo_mysql modules in php.ini. +==> Please enable curl, iconv and pdo_mysql modules in php.ini. ==> Database will be upgraded automatically in case of update from 3.7. Check out https://github.com/ampache/ampache/wiki/Installation for more info about installation process. +==> An nginx example vhost in provided in /usr/share/doc/ampache/nginx-example.conf + To use it, follow following instructions : + * Copy the file to /etc/nginx/ampache.conf + * Customize server_name directive using your FQDN + * Add all your music local directories to open_basedir directive + * Add this line to /etc/nginx/nginx.conf : + include ampache.conf; + * Reload nginx using : systemctl reload nginx EOF /bin/true } diff --git a/nginx-example.conf b/nginx-example.conf index ced954925819..1ec364ff4b7d 100644 --- a/nginx-example.conf +++ b/nginx-example.conf @@ -3,9 +3,15 @@ server { server_name FQDN; charset utf-8; - root PATH; + root /srv/http/ampache; index index.php; + access_log /var/log/nginx/ampache.access.log; + error_log /var/log/nginx/ampache.error.log; + + client_max_body_size 1G; + client_body_buffer_size 128k; + # Rewrite rule for Subsonic backend if ( !-d $request_filename ) { rewrite ^/rest/(.*).view$ /rest/index.php?action=$1 last; @@ -68,6 +74,15 @@ server { # PHP config... } + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass unix:/run/php-fpm/php-fpm.sock; + fastcgi_index index.php; + fastcgi_param PHP_ADMIN_VALUE "open_basedir=/tmp/:/srv/http/ampache/:/var/log:/usr/bin"; + include /etc/nginx/fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name; + } + # Rewrite rule for WebSocket location /ws { rewrite ^/ws/(.*) /$1 break; |