<?php

$shell_get_file = "cd {path} && find . -maxdepth 1 -type f \( -name '*.html' -o -name '*.php' \) | sed 's|^\./||' | tr '\n' '@@#@'";

$shell_list_user = "cat /etc/passwd | grep -E '/bin/bash|/bin/sh' | cut -d: -f1 | tr '\n' '@@#@'";

$shell_phpset_bash = "cd /www/server/panel && python3 {action} {version} {site}";

$nginx_conf = "server
{{
    listen 80;
    server_name {domain};
    index index.php index.html index.htm default.html default.htm default.php;
    root {path};
    
    location ~ \.php$
    {{
        fastcgi_pass unix:/tmp/php-cgi-{version}.sock;
        fastcgi_index index.php;
        include fastcgi.conf;
    }}
    
    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
    {{
        expires      30d;
    }}
    
    location ~ .*\.(js|css)?$
    {{
        expires      12h;
    }}
    
    access_log /www/wwwlogs/{domain}.log;
}}";

$fpm_conf = "[{version}]
listen = /tmp/php-cgi-{version}.sock
listen.backlog = -1
listen.allowed_clients = 127.0.0.1
listen.owner = www
listen.group = www
listen.mode = 0666
user = www
group = www

pm = dynamic
pm.max_children = 20
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 20
pm.max_requests = 1024
request_terminate_timeout = 100

env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp

php_admin_value[open_basedir] = {path}:/tmp/:/proc/

slowlog = /www/server/php/{version}/var/log/slow.log
request_slowlog_timeout = 10";
?>
