Fix nginx detector

This commit is contained in:
phl0
2024-07-25 17:44:47 +02:00
parent f3638c58aa
commit ef44512d8f
2 changed files with 4 additions and 4 deletions

View File

@@ -124,7 +124,7 @@ function detect_webserver() {
}
// Detect nginx setting for PHP file processing
function detect_nginx_php_setting() {
function detect_nginx_php_setting($http_scheme) {
$ch = curl_init($http_scheme.'://'.$_SERVER['HTTP_HOST'].'/install/nginx.php/test');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, 0);

View File

@@ -264,8 +264,8 @@ if (!file_exists('.lock')) {
<td><span class="badge text-bg-info"><?php echo detect_webserver(); ?></span></td>
</tr>
</table>
<?php if (strpos(strtolower($webserver_version), 'nginx') !== false) {
if (detect_nginx_php_setting() != 200) { ?>
<?php if (strpos(strtolower(detect_webserver()), 'nginx') !== false) {
if (detect_nginx_php_setting($http_scheme) != 200) { ?>
<div class="alert alert-warning d-flex flex-column align-items-center" role="alert">
<p class="mb-2 border-bottom"><?= __("Important note for nginx users!"); ?></p>
<p class="mb-0"><?= __("Since you are using nginx as web server please make sure that you have made the changes described in the Wiki before continuing."); ?></p><br>