|
|
|
@ -5,6 +5,29 @@ my $status = $phpmyadmin{'status'} || 'disabled'; |
|
|
|
|
if ($status eq 'enabled'){ |
|
|
|
|
|
|
|
|
|
my $access = (($phpmyadmin{'access'} || 'private') eq 'public') ? 'all':"$localAccess $externalSSLAccess"; |
|
|
|
|
my $php; |
|
|
|
|
my $php =<<'_EOF'; |
|
|
|
|
AddType application/x-httpd-php .php |
|
|
|
|
php_admin_value openbase_dir /usr/share/phpMyAdmin:/etc/phpMyAdmin:/var/lib/phpMyAdmin |
|
|
|
|
php_admin_value session.save_path /var/lib/phpMyAdmin/tmp |
|
|
|
|
php_admin_value post_max_size 100M |
|
|
|
|
php_admin_value upload_max_filesize 100M |
|
|
|
|
php_admin_value memory_limit 500M |
|
|
|
|
php_admin_flag session.use_trans_sid 0 |
|
|
|
|
_EOF |
|
|
|
|
|
|
|
|
|
if ($fastcgi_mod eq 'mod_fastcgi'){ |
|
|
|
|
$php =<<'_EOF'; |
|
|
|
|
AddHandler php__PHP_VERSION__-fastcgi .php |
|
|
|
|
_EOF |
|
|
|
|
} |
|
|
|
|
elsif ($fastcgi_mod eq 'mod_proxy_fcgi'){ |
|
|
|
|
$php =<<'_EOF'; |
|
|
|
|
<FilesMatch \.php$> |
|
|
|
|
SetHandler "proxy:unix:/var/run/php-fpm/php__PHP_VERSION__.sock|fcgi://localhost" |
|
|
|
|
</FilesMatch> |
|
|
|
|
_EOF |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$OUT .=<<"END"; |
|
|
|
|
|
|
|
|
@ -15,13 +38,7 @@ $OUT .=<<"END"; |
|
|
|
|
order deny,allow |
|
|
|
|
deny from all |
|
|
|
|
allow from $access |
|
|
|
|
AddType application/x-httpd-php .php .php3 |
|
|
|
|
php_admin_value openbase_dir /usr/share/phpMyAdmin:/etc/phpMyAdmin:/var/lib/phpMyAdmin |
|
|
|
|
php_admin_value session.save_path /var/lib/phpMyAdmin/tmp |
|
|
|
|
php_admin_value post_max_size 100M |
|
|
|
|
php_admin_value upload_max_filesize 100M |
|
|
|
|
php_admin_value memory_limit 500M |
|
|
|
|
php_admin_flag session.use_trans_sid 0 |
|
|
|
|
$php |
|
|
|
|
</Directory> |
|
|
|
|
|
|
|
|
|
<Directory /usr/share/phpMyAdmin/setup/> |
|
|
|
|