|
|
@@ -229,7 +229,7 @@ class SiteController {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- exec('systemctl reload apache2', $output, $returnCode);
|
|
|
+ exec('sudo /usr/bin/systemctl reload apache2 2>&1', $output, $returnCode);
|
|
|
if ($returnCode !== 0) {
|
|
|
http_response_code(500);
|
|
|
echo json_encode(['error' => 'Failed to reload Apache', 'details' => implode("\n", $output)]);
|
|
|
@@ -263,7 +263,7 @@ class SiteController {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- exec('systemctl reload apache2', $output, $returnCode);
|
|
|
+ exec('sudo /usr/bin/systemctl reload apache2 2>&1', $output, $returnCode);
|
|
|
if ($returnCode !== 0) {
|
|
|
http_response_code(500);
|
|
|
echo json_encode(['error' => 'Failed to reload Apache', 'details' => implode("\n", $output)]);
|