The paths to the nginx configuration files have been fixed

This commit is contained in:
Divarion-D
2026-01-14 20:33:12 +03:00
parent a983ed83c9
commit a43daf9ece
2 changed files with 5 additions and 6 deletions

View File

@@ -108,9 +108,9 @@ function loadcli() {
// Remove 'reuseport' from nginx port configs
foreach (array('http', 'https') as $rType) {
$rPortConfig = file_get_contents(MAIN_HOME . 'bin/nginx/ports/' . $rType . '.conf');
$rPortConfig = file_get_contents(MAIN_HOME . 'bin/nginx/conf/ports/' . $rType . '.conf');
if (stripos($rPortConfig, ' reuseport') !== false) {
file_put_contents(MAIN_HOME . 'bin/nginx/ports/' . $rType . '.conf', str_replace(' reuseport', '', $rPortConfig));
file_put_contents(MAIN_HOME . 'bin/nginx/conf/ports/' . $rType . '.conf', str_replace(' reuseport', '', $rPortConfig));
}
}

View File

@@ -94,11 +94,10 @@ if (posix_getpwuid(posix_geteuid())['name'] == 'root') {
}
foreach (array('http', 'https') as $rType) {
$rPortConfig = file_get_contents(MAIN_HOME . 'bin/nginx/ports/' . $rType . '.conf');
$rPortConfig = file_get_contents(MAIN_HOME . 'bin/nginx/conf/ports/' . $rType . '.conf');
if (stripos($rPortConfig, ' reuseport') === false) {
} else {
file_put_contents(MAIN_HOME . 'bin/nginx/ports/' . $rType . '.conf', str_replace(' reuseport', '', $rPortConfig));
if (stripos($rPortConfig, ' reuseport') !== false) {
file_put_contents(MAIN_HOME . 'bin/nginx/conf/ports/' . $rType . '.conf', str_replace(' reuseport', '', $rPortConfig));
$rReload = true;
}
}