Move everything in /srv/niver

This commit is contained in:
Miraty 2022-06-23 19:19:39 +02:00
parent 9fa902f768
commit 6365ac617c
3 changed files with 6 additions and 7 deletions

View file

@ -1,5 +1,5 @@
[common] [common]
root_path = "/srv/php/niver" root_path = "/srv/niver/core"
; Prefix in URL, if any ; Prefix in URL, if any
prefix = prefix =
@ -9,20 +9,20 @@ knotc_path = "/usr/sbin/knotc"
[reg] [reg]
enabled = true enabled = true
registry = niver.test. registry = niver.test.
registry_file = "/srv/ns/niver.test.zone" registry_file = "/srv/niver/reg/niver.test.zone"
ttl = 86400 ttl = 86400
subdomain_regex = "^[a-z0-9]{4,63}$" subdomain_regex = "^[a-z0-9]{4,63}$"
[ns] [ns]
enabled = true enabled = true
knot_zones_path = "/srv/ns" knot_zones_path = "/srv/niver/ns"
[ht] [ht]
enabled = true enabled = true
; Path were user's sites will be stored ; Path were user's sites will be stored
ht_path = "/srv/ht" ht_path = "/srv/niver/ht"
; Nginx configuration directory ; Nginx configuration directory
nginx_config_path = "/etc/nginx/ht" nginx_config_path = "/srv/niver/nginx"
; Tor configuration directory ; Tor configuration directory
tor_config_path = "/srv/niver/tor-config" tor_config_path = "/srv/niver/tor-config"
; Tor keys directory ; Tor keys directory

View file

@ -31,7 +31,7 @@ if (chmod($knotZonePath, 0660) !== true)
knotcConfExec([ knotcConfExec([
"set 'zone[" . $_POST['domain'] . "]'", "set 'zone[" . $_POST['domain'] . "]'",
"set 'zone[" . $_POST['domain'] . "].template' 'niver'", "set 'zone[" . $_POST['domain'] . "].template' 'niver-ns'",
]); ]);
success("La requête a été traitée."); success("La requête a été traitée.");

View file

@ -3,7 +3,6 @@
require "common/init.php"; require "common/init.php";
$authData = json_decode(file_get_contents("php://input"), true); $authData = json_decode(file_get_contents("php://input"), true);
$user = json_decode($authData['user'], true);
if (checkPassword($authData['username'], $authData['password']) === true) { if (checkPassword($authData['username'], $authData['password']) === true) {
echo '{"status":1,"username":"' . $authData['username'] . '","permissions":{"/":["*"]}}'; echo '{"status":1,"username":"' . $authData['username'] . '","permissions":{"/":["*"]}}';