aboutsummaryrefslogtreecommitdiff
path: root/modules/private/websites/commons/adminer.nix
blob: 98ab4619b9c64355142f6c47cb4bf877ea115833 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{}:
rec {
  phpFpm = {
    socket = "/var/run/phpfpm/adminer.sock";
  };
  apache = rec {
    modules = [ "proxy_fcgi" ];
    webappName = "_adminer";
    root = "/run/current-system/webapps/${webappName}";
    vhostConf = ''
      Alias /adminer ${root}
      <Directory ${root}>
        DirectoryIndex index.php
        Require all granted
        <FilesMatch "\.php$">
          SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
        </FilesMatch>
      </Directory>
      '';
  };
}