1 { stdenv, fetchurl, nginx }:
4 webRoot = stdenv.mkDerivation rec {
6 name = "adminer-${version}";
8 url = "https://www.adminer.org/static/download/${version}/${name}.php";
9 sha256 = "1qq2g7rbfh2vrqfm3g0bz0qs057b049n0mhabnsbd1sgnpvnc5z7";
11 phases = "installPhase";
14 cp $src $out/index.php
18 socket = "/var/run/phpfpm/adminer.sock";
22 group = ${apache.group}
23 listen.owner = ${apache.user}
24 listen.group = ${apache.group}
27 pm.process_idle_timeout = 60
28 ;php_admin_flag[log_errors] = on
29 ; Needed to avoid clashes in browser cookies (same domain)
30 php_value[session.name] = AdminerPHPSESSID
31 php_admin_value[open_basedir] = "${webRoot}:/tmp"
32 php_admin_value[session.save_path] = "/var/lib/php/sessions/adminer"
38 modules = [ "proxy_fcgi" ];
40 Alias /adminer ${webRoot}
41 <Directory ${webRoot}>
42 DirectoryIndex index.php
44 SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
53 include ${nginx}/conf/fastcgi.conf;
54 fastcgi_split_path_info ^(.+?\.php)(/.*)$;
55 fastcgi_param HTTP_PROXY "";
56 fastcgi_param SCRIPT_FILENAME ${webRoot}/index.php;
57 fastcgi_pass unix:${phpFpm.socket};
58 fastcgi_index index.php;
59 fastcgi_intercept_errors on;