Run panel on dedicated novacpx-web Nginx service; fix auth/transaction methods

- deploy/nginx-panel.conf: standalone Nginx config for ports 8880-8883
- deploy/novacpx-web.service: systemd unit, survives apache2/nginx stop
- server_setup.php: fix Auth::requireRole() -> require('admin')
- DB.php: add beginTransaction()/commit()/rollback() methods
This commit is contained in:
2026-06-09 16:00:32 +00:00
parent c01a03645d
commit bcd3b65520
4 changed files with 157 additions and 1 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
*/
$db = DB::getInstance();
$body = json_decode(file_get_contents('php://input'), true) ?? [];
Auth::getInstance()->requireRole(['admin']);
Auth::getInstance()->require('admin');
function getSetting(string $key, $db): ?string {
return $db->fetchOne("SELECT value FROM settings WHERE `key` = ?", [$key])['value'] ?? null;