Linux sagir-us1.hostever.us 5.14.0-570.51.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 8 09:41:34 EDT 2025 x86_64
LiteSpeed
Server IP : 104.247.108.91 & Your IP : 216.73.216.26
Domains : 74 Domain
User : georgeto
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
softaculous /
apps /
openlitespeed /
themes /
admin /
Delete
Unzip
Name
Size
Permission
Date
Action
lsphp_settings_theme.php
14.32
KB
-rw-r--r--
2024-09-20 08:35
ols_settings_theme.php
15.53
KB
-rw-r--r--
2026-04-06 03:24
Save
Rename
<?php ////////////////////////////////////////////////////////////// //=========================================================== // WEBUZO CONTROL PANEL // Inspired by the DESIRE to be the BEST OF ALL // ---------------------------------------------------------- // Started by: Pulkit // Date: 10th Jan 2009 // Time: 21:00 hrs // Site: https://webuzo.com/ (WEBUZO) // ---------------------------------------------------------- // Please Read the Terms of Use at https://webuzo.com/terms // ---------------------------------------------------------- //=========================================================== // (c) Softaculous Ltd. //=========================================================== ////////////////////////////////////////////////////////////// if(!defined('SOFTACULOUS')){ die('Hacking Attempt'); } function ols_settings_theme(){ global $user, $globals, $l, $theme, $error, $done, $dserver, $autoindex, $cusotm_headers, $ols_conf, $protocol_options; error_handle($error, '100%'); echo ' <div class="soft-smbox p-3 col-12 col-md-11 mx-auto"> <div class="sai_main_head"> <img src="'.$theme['images'].'settings.png" class="me-1" />'. __('OpenLiteSpeed Additional Settings').' </div> </div> <div class="soft-smbox p-3 mt-4 mb-3 col-12 col-md-11 mx-auto">'; echo ' <form accept-charset="'.$globals['charset'].'" name="editsettings" method="post" action="" class="form-horizontal" id="editformhttp2" onsubmit="return submitit(this)" data-donereload="1">'; echo ' <div class="row mb-3"> <div class="col-10 col-md-5"> <div class="flex-grow-1"> <label class="sai_head"> '.__('No IP in Virtual Host').' <i class="fas fa-info-circle ms-1" data-bs-toggle="tooltip" data-bs-html="true" data-bs-placement="top" title="'.__('If selected, then no ip will be configured for virtual blocks in web servers.').'"></i> </label> </div> </div> <div class="col-2 col-sm-7"> <input type="checkbox" name="vhost_no_ip" '.POSTchecked('vhost_no_ip', $globals['vhost_no_ip']).' /> </div> </div><br/> <div class="row mb-3"> <div class="col-10 col-md-5"> <div class="flex-grow-1"> <label class="sai_head">'. __('Follow Symbolic Link').' <i class="fas fa-info-circle ms-1" data-bs-toggle="tooltip" data-bs-html="true" data-bs-placement="top" title="'. __('Check if you want to enable follow symbolic link').'"></i> </label> </div> </div> <div class="col-2 col-sm-7"> <input type="checkbox" name="allowsymlink" id="allowsymlink" '.POSTchecked('allowsymlink', (!$globals['web_server_opt']['ols']['allowsymlink'])).' /> </div> </div><br> <div class="row"> <div class="col-sm-5"> <label class="sai_head">'. __('LogLevel').' </label><br/> <span class="sai_exp2">'. __('System Default').' : '.__('ERROR').' </span> </div> <div class="col-sm-7"> <select class="form-select" name="loglevel" id="loglevel">'; $loglevel = ['ERROR', 'DEBUG', 'WARNING', 'NOTICE', 'INFO']; foreach($loglevel as $value){ $selected = ''; if($value == $globals['web_server_opt']['ols']['log_level']){ $selected = 'selected'; } echo '<option value="'.$value.'" '.$selected.'>'.$value.'</option>'; } echo ' </select> </div> </div><br/> <div class="row mb-3"> <div class="col-md-5"> <div class="flex-grow-1"> <label class="sai_head"> '.__('Max depth').' <i class="fas fa-info-circle ms-1" data-bs-toggle="tooltip" data-bs-html="true" data-bs-placement="top" title="'.__('it will scan for .htaccess files in public_html folders, with a max depth of 2 folders default value is 2').'"></i> </label> </div> </div> <div class="col-sm-7"> <input type="number" name="htaccess_maxdepth" min=2 class="form-control" value = "'.POSTval('htaccess_maxdepth', (!empty($globals['web_server_opt']['ols']['htaccess_maxdepth']) ? $globals['web_server_opt']['ols']['htaccess_maxdepth'] : 2)).'"/> </div> </div><br> <div class="row mb-3"> <div class="col-10 col-md-5"> <label class="sai_head">'. __('Show Suspend Resaon').' <i class="fas fa-info-circle ms-1" data-bs-toggle="tooltip" data-bs-html="true" data-bs-placement="top" title="'. __('If selected, it will show suspended resaon when access suspended users domain.').'"></i> </label> </div> <div class="col-2 col-md-7"> <input type="checkbox" name="suspended_reason" id="suspended_reason" '.POSTchecked('suspended_reason', (!$globals['web_server_opt']['ols']['suspended_reason'])).' /> </div> </div><br/> <div class="row mb-3"> <div class="col-10 col-md-5"> <div class="flex-grow-1"> <label class="sai_head"> '.__('Auto Index').' </label><br> <span class="sai_exp2">'. __('Check if you want to generate a directory index when index files are not available in a directory.').' </span> </label> </div> </div> <div class="col-12 col-md-7"> <input type="checkbox" id="ai_all" name="ai_all" '.(($autoindex['domains'] === 1) ? 'checked' : '').'> <label class="form-label" for="ai_all">'.__('All Users OR Domains').' <span class="sai_exp">'. __('If you checked this option auto Index will be enable for all domains.').' </span></label><br> <div class="row m-1" id="select_domains" '.($autoindex['domains']=== 1 ? 'style="display:none;"' : '').'> <div class="col-12 col-md-4"> <label class="form-label">'.__('Select Domains').'</label> </div> <div class="col-12 col-md-8"> <select id="select_domainss" name="ai_select_domains[]" class="form-select make-select2" s2-placeholder="'.__('All Domains').'" s2-ajaxurl="'.$globals['index'].'act=domains&api=json" s2-query="search" s2-data-key="domains" s2-data-subkey="domain" style="width:100%" multiple>'; if(!empty($autoindex['domains']) && $autoindex['domains'] != 1){ foreach($autoindex['domains'] as $k => $v){ echo '<option '.(POSTval('ai_select_domains', $v) == $v ? 'selected': '').' value="'.$v.'">'.$v.'</option>'; } } echo' </select> </div> </div> <div class="row m-1" id="select_users" '.($autoindex['users'] === 1 ? 'style="display:none;"' : '').'> <div class="col-12 col-md-4"> <label class="form-label" for="allusers">'.__('Select Users').'</label><br> </div> <div class="col-12 col-md-8"> <select id="select_userss" name="ai_select_users[]" class="form-select make-select2" s2-placeholder="'.__('All Users').'" s2-ajaxurl="'.$globals['index'].'act=users&api=json" s2-query="search" s2-data-key="users" s2-data-subkey="user" style="width:100%" multiple>'; if(!empty($autoindex['users']) && $autoindex['users'] != 1){ foreach($autoindex['users'] as $k => $v){ echo '<option '.(POSTval('ai_select_users', $v) == $v ? 'selected': '').' value="'.$v.'">'.$v.'</option>'; } } echo' </select> </div> </div> </div> </div><br /> <div class="row mb-3"> <div class="col-10 col-md-5"> <div class="flex-grow-1"> <label class="sai_head">'. __('Enable Gzip Compression').' <i class="fas fa-info-circle ms-1" data-bs-toggle="tooltip" data-bs-html="true" data-bs-placement="top" title="'. __('Check if you want to enable Gzip compression').'"></i> </label> </div> </div> <div class="col-2 col-sm-7"> <input type="checkbox" name="gzipon" id="gzipon" '.POSTchecked('gzipon', (!$globals['NO_GZIP'])).' /> </div> </div><br> <div class="row mb-3"> <div class="col-10 col-md-5"> <div class="flex-grow-1"> <label class="sai_head"> '.__('Enable USER MOD DIR').' <i class="fas fa-info-circle ms-1" data-bs-toggle="tooltip" data-bs-html="true" data-bs-placement="top" title="'.__('It is not recommended to enable the User Mod Dir unless you have a specific need for it, as enabling it can pose significant security risks on shared hosting environments by allowing users to access each others content and $0 it will run php script as nobody as openlitespeed runs as nobody user $1', ['<b>', '</b>']).'"></i> <br/> </label> </div> </div> <div class="col-2 col-sm-7"> <input type="checkbox" id="user_mod_dir" name="user_mod_dir" '.POSTchecked('user_mod_dir', $globals['user_mod_dir']).'/> </div> </div><br> <div class="row mb-3"> <div class="col-10 col-md-5"> <label class="sai_head">'. __('SSL Protocol').' <i class="fas fa-info-circle ms-1" data-bs-toggle="tooltip" data-bs-html="true" data-bs-placement="top" title="'.__('SSL Protocol version to be used. If none is selected, default values will be used (TLS v1.3, v1.2, v1.1, v1.0) {$0}{$1}Note{$2}: You cannot skip versions. Your enabled protocols must form a continuous range from lowest to highest. Any missing version in the middle will cause all higher versions to be disabled.', ['<br>', '<b>', '</b>']).'"></i> </label></br> <span class="sai_exp2">'. __('Default').' : '.__('TLS v1.3, v1.2, v1.1, v1.0').' </span> </div> <div class="col-2 col-sm-7">'; // Get the saved array $saved_protocols = (isset($ols_conf['ssl_protocol']) && is_array($ols_conf['ssl_protocol']) ? $ols_conf['ssl_protocol'] : [16, 8, 4, 2]); foreach($protocol_options as $label => $val){ // Is this value in my list? $checked = in_array($val, $saved_protocols) ? 'checked="checked"' : ''; echo '<input type="checkbox" name="ssl_protocol[]" value="'.$val.'" id="protocol_'.$val.'" '.$checked.' /><label class="form-label ps-1" for="protocol_'.$val.'">'.$label.'</label></br>'; } echo ' </div> </div><br/> <div class="row mb-3"> <div class="col-10 col-md-5"> <div class="flex-grow-1"> <label class="sai_head"> '.__('Select Domain to Access via IP').' </label><br> <span class="sai_exp2">'. __('Please select domain you want to access via its assigned IP address.').' </span> </label> </div> </div> <div class="col-12 col-md-7"> <div class="col-12 col-md-8"> <select class="form-select make-select2" s2-ajaxurl="'.$globals['index'].'act=domains&api=json" s2-query="dom_search" s2-data-key="domains" s2-data-subkey="domain" style="width: 100%" name="run_domain_ip" id="dom_search"> <option '.(POSTval('run_domain_ip', $ols_conf['run_domain_ip']) == $ols_conf['run_domain_ip'] ? 'selected': '').' value="'.$ols_conf['run_domain_ip'].'">'.$ols_conf['run_domain_ip'].'</option> </select> </div> </div> </div><br /> <div class="text-center mt-4"> <input type="submit" class="btn btn-primary" name="editsettings" value="'.__('Save Settings').'"/> </div> </form> </div> <!-- Custom headers --> <div class="soft-smbox p-3 mb-3 col-12 col-md-11 mx-auto" id="custom_headers"> <div class="sai_main_head text-center"> '.__('Custom Headers').' </div><hr> <form accept-charset="'.$globals['charset'].'" name="custom_headers" method="post" action="" class="form-horizontal" onsubmit="return submitit(this)" data-donereload="1"> <div class="row mb-3"> <div class="col-12 col-md-5 flex-grow-1"> <label class="sai_head">'. __('Add Custom Headers').' <i class="fas fa-info-circle ms-1" data-bs-toggle="tooltip" data-bs-html="true" data-bs-placement="top" title="'. __('Example: set Cache-control no-cache $0 append Cache-control no-store $0 Header set My-header cust_header_val', ['<br>']).'"></i><br> <span class="sai_exp2">'.__('Note: Please ensure headers are added using the correct syntax, one per line. Incorrect header formats may cause OLS service issues.').'</span> </label> </div> <div class="col-12 col-md-7 col-lg-7"> <textarea class="form-control custom_code" type="text" name="c_headers" style="width:100%;height:150px;" spellcheck="false">'.$cusotm_headers['custom_header'].'</textarea> </div> <div class="text-center mt-4"> <input type="submit" class="btn btn-primary" name="custom_headers" value="'.__('Save Custom Headers').'"/> </div> </div> </form> </div>'; // Enable varnish block if installed if(is_app_installed('varnish', 1)){ echo ' <div class="soft-smbox p-3 mb-3 col-12 col-md-11 mx-auto" id="varnish_section"> <div class="sai_main_head text-center"> <img src="'.$theme['images'].'/87_icon.png" /> '. __('Varnish Settings').' </div> <hr> <form accept-charset="'.$globals['charset'].'" name="enablevarnish" method="post" action="" class="form-horizontal" id="enablevarnish" onsubmit="return submitit(this)" data-donereload="1"> <div class="row mb-3"> <div class="col-10 col-md-5"> <label class="sai_head">'. __('Enable Varnish').' <i class="fas fa-info-circle ms-1" data-bs-toggle="tooltip" data-bs-html="true" data-bs-placement="top" title="'. __('Check to enable Varnish Cache').'"></i> </label> </div> <div class="col-2 col-md-7"> <input type="checkbox" name="varnishon" id="varnishon" '.POSTchecked('varnishon', $globals['VARNISH_PORT']).' /> </div> </div> <div class="row"> <div class="col-12 col-md-5"> <label class="sai_head" for="varnish_port"> '.__('Port No').' <i class="fas fa-info-circle ms-1" data-bs-toggle="tooltip" data-bs-html="true" data-bs-placement="top" title="'.__('Port for running Apache Service<br /> <strong>Note: </strong>No other service should be running on this port.').'"></i> </label> </div> <div class="col-12 col-md-7"> <input type="text" value="'.POSTval('varnish_port', (!empty($globals['VARNISH_PORT']) ? $globals['VARNISH_PORT'] : '')).'" name="varnish_port" id="varnish_port" class="form-control"/> </div> </div> <div class="text-center my-4"> <input type="submit" class="btn btn-primary" name="editvarnishsettings" value="'.__('Save Settings').'" id="submitvarnish"> </div> <div class="text-center sai_notice"> '.__('NOTE: Using both Varnish and OpenLiteSpeed cache simultaneously can lead to conflicts, inconsistent caching behavior. This functionality is currently in BETA and some sites may not work well with HTTPS').' </div> </form> </div>'; } echo' <script> $("#ai_all").click(function(){ if($("#ai_all").is(":checked")){ $("#select_domains").css("display", "none");; $("#select_users").css("display", "none");; }else{ $("#select_domains").css("display", "flex"); $("#select_users").css("display", "flex"); } }); $(document).ready(function() { var a; $("#user_mod_dir").change(function() { var jEle = $(this); if (jEle.prop("checked")) { // console.log("test");return; var lang = "'.__js('Enabling $0 UserModDir $1 will cause it to run as the nobody user, which may introduce security risks. $2 $0 Note $1: If you still want to enbale please click Save Settings button to apply the changes.', ['<b>', '</b>', '<br>']).'"; a = show_message_r("'.__js('Warring').'", lang); a.alert = "alert-danger"; a.ok.push(function(){ $("#user_mod_dir").prop("checked", true); }); show_message(a); } }); }); </script>'; }