summarylogtreecommitdiffstats
path: root/nginx-example.conf
diff options
context:
space:
mode:
authorThomas Sarboni2015-07-20 00:28:44 +0200
committerThomas Sarboni2015-07-20 00:28:44 +0200
commit3a695dff235136b6dda7b6523752b81171f88c08 (patch)
tree4357cbe0b1e53892f3bf6f91280c706699fb0357 /nginx-example.conf
parent079593e1af24fb63c827b0ab499eaba18be8c52e (diff)
downloadaur-3a695dff235136b6dda7b6523752b81171f88c08.tar.gz
Updated nginx example and install file
Diffstat (limited to 'nginx-example.conf')
-rw-r--r--nginx-example.conf17
1 files changed, 16 insertions, 1 deletions
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;