Download????????????? ??????????? ?? ???????? ??????? ??? ?????????????? Apache
???? ? ?????? ?????????? ??????? ??? ?? Ascoos OS ???????????? ???????????, ??????? ???????? ???????, ????????????? ?? ????????????? ??????? ??? ????????????? ?? ?????????? ??? Apache ?? ???? ?? ???????????? ??? ????????.
??????
-
????????????? ?????????????? ???????????, ???????? SEO ??? ????????? ?????????.
-
???????? ????????? ???????? (????????? ??????? ??? ??????? ?????????????) ??? ??????????? ??? ???????????.
-
????????????? ????? ?????????? ??? ???????????? ???????.
-
???????? ?????????????? ??? ??????????? ??? Apache ?? ???? ?? ????????????.
?????? ??????? ??? Ascoos OS
-
TApacheHandler
????????????? ?? ?????????? ??? Apache, ??? ????????? ??? ?? ?????????????? (?.?. ???????????? mod_rewrite, ??????? ??????? QoS).
-
TNetwork
??????? ?? ????????????? ??????? ??? ????? ??? ???????????.
-
TWebsiteHandler
??????? ???????? ??????????????, ??????? SEO ??? ???????? ???????????? ???????????.
-
TLanguageHandler
????????? ?? ?????? ???????? ??? ??????? ??????? ?????????????.
-
TFilesHandler
????????????? ??????????? ???????, ???? backups ??? ?????????? ????????.
-
TCoreSystemHandler
???????????? ?????? ??????????, ???? ? ?????? ??? CPU.
-
TQueueHandler, TStackHandler, TTaskHandler, TThreadHandler
?????????????? ??? ???? ????????, ??? ???????? ??? ??? ????????? ??????????? ?? ??????.
???? ???????
? ????????? ?????????? ?? ??? ?????? PHP:
- website_monitoring_with_apache_optimization.php
?? ?????? ???????????? ??? ?? ?????? ??? ??? ????????????? ???????????, ?? ???????? ???????, ???? ???????? ??????? ??? ?? ?????????????? ??? Apache.
??????????????
-
PHP ? 8.2
-
????????????? ?? Ascoos OS ? ??
AWES 26
??? ?????????
-
??????????????? ?? ???????? ?????????? ??? ?? ????????? ??? ?????????, ?????????? ??????? ??? ???????? ???????.
-
???????? ????? ??????????? ??? ????????????? (`https://example.com`, `https://test.com`, `https://demo.org`).
-
?????????????? ???????? ??? ???? ?????????? ???:
- ???????? ?? ????????????? ??????? ??? ??? ???????????.
- ??????????? ?? ?????????????, ?? ?????????? SEO ??? ???? ?????????? ??????????.
- ???????? ??? ?????????? ??? ?????????????? SSL.
- ???????? ??? ?????????? ?? ??????????? ??? ??????????? ??? ???????? ??????? (????????? ??????? ??? ??????? ?????????????).
- ????????????? ??? ????? ??? CPU.
-
?? ???????? ???????????? ?? ???? ??? ??????????? ????????? ?? ??? 3 ??????.
-
?? ???????????? ????????????? ?? cache ??? ??????? ????????????????? ????????????.
-
?????????? ?? ???????????? ??? ?? ?????????? ?? ?????????? ?????????????? ??? Apache (?.?. ???????????? mod_rewrite, ??????? ??????? QoS).
-
????????????? backup ??? ??????????? ??? Apache ?? ?? ????????????? SSL ????? ?????.
-
????????????? ??? ???????????? ??????? ?? ????? JSON.
-
? ??????? ???????????? ???? email ???? ???????????.
-
???????????????? ?? ?????.
?????????? ??????
$websites = ['https://example.com', 'https://test.com', 'https://demo.org'];
$tasks = [];
foreach ($websites as $url) {
$tasks[] = [
'id' => md5($url),
'callback' => function () use ($url, $website, $language, $system, $network, $apache) {
$result = [
'url' => $url,
'availability' => $website->checkAvailability($url),
'seo_score' => $website->analyzeSEO($url)['score'] ?? 0.0,
'broken_links' => $website->checkBrokenLinks($url),
'ssl_status' => $apache->checkSSLCertificate(parse_url($url, PHP_URL_HOST)),
'language' => $language->getTextLanguage(strip_tags($website->getHTMLContent($url))),
'sentiment' => $website->analyzeSentiment(strip_tags($website->getHTMLContent($url)), $language->getTextLanguage(strip_tags($website->getHTMLContent($url)))),
'cpu_load' => $system->get_cpu_load(0),
'latency' => $network->checkLatency(parse_url($url, PHP_URL_HOST))
];
$apache->logger?->log("??????? ??? $url: " . json_encode($result, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE), $apache->logger::DEBUG_LEVEL_INFO);
return $result;
}
];
}
$thread->setMaxThreads(3);
while (!$queue->isEmpty()) {
$taskId = $queue->extract();
if ($cached = $task->checkCache($taskId)) {
$results[$taskId] = $cached;
continue;
}
$thread->startThread($taskId, function () use ($task, $taskId, &$results) {
$result = $task->executeNextQueueTask();
$task->saveCache($taskId, $result);
$results[$taskId] = $result;
});
}
$thread->monitorThreads();
if ($needsOptimization && !$apache->exists_module('rewrite')) {
$apache->enableModule('rewrite');
}
if ($needsBackup) {
$apache->backupConfig(PHP_OS_FAMILY === 'Windows' ? 'C:/Apache24/conf/httpd.conf' : '/etc/apache2/apache2.conf', $properties['file']['dataDir']);
}
??????????? ??????????
????????????? ??? ??????? JSON ??? ???????????? ???? ?????? ???????? (?.?. website_analysis_20251003_1159.json): {
"d8e8fca2dc0f896fd7cb4cb0031ba249": {
"url": "https://example.com",
"availability": true,
"seo_score": 85.5,
"broken_links": [],
"ssl_status": { "is_expired": false },
"language": "en",
"sentiment": "positive",
"cpu_load": 45.2,
"latency": 120.5
},
...
}
? ??????? ???????????? ???? email ??? admin@example.com. ? ?????????? ??? Apache ???????????? ?? ?????????? (?.?. ???????????? mod_rewrite, ??????? ??????? QoS).
?????
??????????
???????? ?? ?????????? ?? ??????? ???????????? ???????????? ????????? ???????????, ???????????? ?? ???????? ??????? ? ???????????????? ?? ?????????? ???????. ????? ?? CONTRIBUTING.md ??? ???????.
????? ??????
???? ? ?????? ?????????? ??? ??? Ascoos General License (AGL). ????? ?? LICENSE.md.
|