testing shaarli api changes
This commit is contained in:
parent
4e944193bf
commit
594b7eae1f
|
@ -12,14 +12,15 @@ in
|
|||
enableACME = false;
|
||||
root = "${dataDir}";
|
||||
extraConfig = ''
|
||||
index index.php;
|
||||
'';
|
||||
locations = {
|
||||
"/".extraConfig = ''
|
||||
try_files $uri $uri/ index.php$is_args$args;
|
||||
index index.php;
|
||||
'';
|
||||
locations = {
|
||||
"/".extraConfig = ''
|
||||
index index.php;
|
||||
try_files _ /index.php$is_args$args;
|
||||
'';
|
||||
|
||||
"~ (index)\\.php$".extraConfig = ''
|
||||
"~ (index)\\.php$".extraConfig = ''
|
||||
try_files $uri =404;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
|
||||
|
@ -74,18 +75,18 @@ in
|
|||
user = "nginx";
|
||||
group = "nginx";
|
||||
#listen = "/run/phpfpm/php.sock";
|
||||
settings = {
|
||||
"listen.owner" = "nginx";
|
||||
"listen.group" = "nginx";
|
||||
"user" = "nginx";
|
||||
"pm" = "dynamic";
|
||||
"pm.max_children" = "4";
|
||||
"pm.min_spare_servers" = "1";
|
||||
"pm.max_spare_servers" = "4";
|
||||
"pm.max_requests" = "32";
|
||||
"catch_workers_output" = "1";
|
||||
"php_admin_value[error_log]" = "/var/log/nginx/${name}-phpfpm-error.log";
|
||||
};
|
||||
settings = {
|
||||
"listen.owner" = "nginx";
|
||||
"listen.group" = "nginx";
|
||||
"user" = "nginx";
|
||||
"pm" = "dynamic";
|
||||
"pm.max_children" = "4";
|
||||
"pm.min_spare_servers" = "1";
|
||||
"pm.max_spare_servers" = "4";
|
||||
"pm.max_requests" = "32";
|
||||
"catch_workers_output" = "1";
|
||||
"php_admin_value[error_log]" = "/var/log/nginx/${name}-phpfpm-error.log";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -96,17 +97,17 @@ in
|
|||
serviceConfig.Type = "oneshot";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
script = ''
|
||||
if [ ! -d "${dataDir}" ]; then
|
||||
#cp -R ${pkgs.shaarli}/data.orig/.htaccess ${dataDir}/cache/
|
||||
#cp -R ${pkgs.shaarli}/data.orig/.htaccess ${dataDir}/data/
|
||||
#cp -R ${pkgs.shaarli}/data.orig/.htaccess ${dataDir}/pagecache/
|
||||
#cp -R ${pkgs.shaarli}/data.orig/.htaccess ${dataDir}/tmp/
|
||||
mkdir -p ${dataDir}/{cache,data,pagecache,tmp}
|
||||
ln -s ${pkgs.shaarli}/* ${dataDir}
|
||||
fi
|
||||
chown -Rc nginx:nginx ${dataDir}
|
||||
find ${dataDir} -type d ! -perm 0700 -exec chmod 0700 {} \; -exec chmod g-s {} \;
|
||||
find ${dataDir} -type f ! -perm 0600 -exec chmod 0600 {} \;
|
||||
if [ ! -d "${dataDir}" ]; then
|
||||
#cp -R ${pkgs.shaarli}/data.orig/.htaccess ${dataDir}/cache/
|
||||
#cp -R ${pkgs.shaarli}/data.orig/.htaccess ${dataDir}/data/
|
||||
#cp -R ${pkgs.shaarli}/data.orig/.htaccess ${dataDir}/pagecache/
|
||||
#cp -R ${pkgs.shaarli}/data.orig/.htaccess ${dataDir}/tmp/
|
||||
mkdir -p ${dataDir}/{cache,data,pagecache,tmp}
|
||||
ln -s ${pkgs.shaarli}/* ${dataDir}
|
||||
fi
|
||||
chown -Rc nginx:nginx ${dataDir}
|
||||
find ${dataDir} -type d ! -perm 0700 -exec chmod 0700 {} \; -exec chmod g-s {} \;
|
||||
find ${dataDir} -type f ! -perm 0600 -exec chmod 0600 {} \;
|
||||
'';
|
||||
};
|
||||
# TODO: Write the configuration file here?
|
||||
|
|
Loading…
Reference in a new issue