initial commit of file from CVS for smeserver-phpsysinfo on Sat Sep 7 20:53:46 AEST 2024
This commit is contained in:
1
root/etc/e-smith/db/accounts/defaults/phpsysinfo/type
Normal file
1
root/etc/e-smith/db/accounts/defaults/phpsysinfo/type
Normal file
@@ -0,0 +1 @@
|
||||
reserved
|
@@ -0,0 +1 @@
|
||||
private
|
@@ -0,0 +1 @@
|
||||
configuration
|
@@ -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>
|
||||
|
@@ -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";
|
||||
}
|
||||
}
|
30
root/etc/e-smith/web/functions/phpsysinfo
Normal file
30
root/etc/e-smith/web/functions/phpsysinfo
Normal 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;
|
Reference in New Issue
Block a user