initial commit of file from CVS for smeserver-phpsysinfo on Sat Sep 7 20:53:46 AEST 2024

This commit is contained in:
Trevor Batley
2024-09-07 20:53:46 +10:00
parent 8f9c36d1f5
commit 9552652292
693 changed files with 86806 additions and 2 deletions

View File

@@ -0,0 +1 @@
reserved

View File

@@ -0,0 +1 @@
private

View File

@@ -0,0 +1 @@
configuration

View File

@@ -0,0 +1,23 @@
# phpsysinfo
Alias /phpsysinfo /opt/phpsysinfo
<Directory /opt/phpsysinfo>
SSLRequireSSL
Options -Indexes
AuthName "phpSysInfo"
AuthBasicProvider external
AuthType Basic
AuthExternal pwauth
<RequireAll>
Require user admin
Require {(($phpmyadmin{access} || 'private' ) eq "public" ) ? "all granted": "ip $localAccess $externalSSLAccess";}
</RequireAll>
AddType application/x-httpd-php .php .php3
<FilesMatch .php$>
SetHandler "proxy:unix:/var/run/php-fpm/php.sock|fcgi://localhost"
</FilesMatch>
</Directory>

View File

@@ -0,0 +1,8 @@
{
$haveSSL = (exists ${modSSL}{status} and ${modSSL}{status} eq "enabled") ? 'yes' : 'no';
if (($port eq "80") && ($haveSSL eq 'yes'))
{
$OUT .= " RewriteRule ^/phpsysinfo(/.*|\$) https://%{HTTP_HOST}/phpsysinfo\$1 [L,R]\n";
}
}

View File

@@ -0,0 +1,30 @@
#!/usr/bin/perl
#----------------------------------------------------------------------
# heading : Administration
# description : PhpSysInfo
# navigation : 4000 4200
#----------------------------------------------------------------------
use strict;
use CGI':all';
use CGI::Carp qw(fatalsToBrowser);
BEGIN
{
$ENV {'PATH'} = '/bin:/usr/bin:/sbin';
$ENV {'SHELL'} = '/bin/bash';
delete $ENV {'ENV'};
}
my $q = new CGI;
my $content="0; url=https://".$ENV {'HTTP_X_FORWARDED_HOST'}."/phpsysinfo";
$q->default_dtd('-//W3C//DTD XHTML 1.0 Transitional//EN');
print $q->header ('text/html');
print $q->start_html (-head=>meta({-http_equiv=>'refresh', -content=>$content}));
print $q->end_html;