Add Subdomains to Log Rotate, Prevent Access to Subdomain Logs, and Minor Fixes
This commit is contained in:
parent
33e43f19ca
commit
4aed0f0ddd
6 changed files with 32 additions and 2 deletions
|
@ -15,6 +15,10 @@
|
|||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9000{homedir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir={homedir}/phptmpdir; \n session.save_path={homedir}/phptmpdir;"
|
||||
|
||||
<FilesMatch "access_log|error_log">
|
||||
Deny from All
|
||||
</FilesMatch>
|
||||
|
||||
{customsubdomainhttp}
|
||||
|
||||
</VirtualHost>
|
||||
|
|
|
@ -12924,7 +12924,13 @@ function build_logrotate_conf($arr2,$host){
|
|||
if($this->debuglevel>0) print_r($arr2);
|
||||
|
||||
foreach($arr2 as $dom) {
|
||||
$logrotate .= $dom['homedir']."/logs/access_log ".$dom['homedir']."/logs/error_log ";
|
||||
$logrotate .= $dom['homedir']."/logs/access_log " . $dom['homedir'] . "/logs/error_log ";
|
||||
|
||||
// Add subdomain log files
|
||||
$subdomains = $this->getSubDomains("domainname = '" . $dom['domainname'] . "'");
|
||||
foreach($subdomains as $subd){
|
||||
$logrotate .= $subd['homedir']."/logs/access_log " . $subd['homedir'] . "/logs/error_log ";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -14100,7 +14106,7 @@ function syncSubdomains($file='',$domainname) {
|
|||
if(!empty($webserver_template)){
|
||||
$webserver_template=str_replace(array('{ehcpdir}','{localip}'),array($this->ehcpdir,$this->miscconfig['localip']), $webserver_template);
|
||||
$webserver_config=str_replace($replacealanlar,$ar1,$webserver_template);
|
||||
$fileOut .= $webserver_config;
|
||||
$fileOut .= (!startsWith($webserver_config, PHP_EOL) ? PHP_EOL : "") . $webserver_config . (!endsWith($webserver_config, PHP_EOL) ? PHP_EOL : ""); // Directives need to be separated by newlines
|
||||
}else{
|
||||
$arr3[] = $ar1;
|
||||
}
|
||||
|
|
|
@ -14,6 +14,10 @@
|
|||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9000{homedir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir={homedir}/phptmpdir; \n session.save_path={homedir}/phptmpdir;"
|
||||
|
||||
<FilesMatch "access_log|error_log">
|
||||
Deny from All
|
||||
</FilesMatch>
|
||||
|
||||
{customsubdomainhttp}
|
||||
|
||||
</VirtualHost>
|
||||
|
|
|
@ -15,6 +15,10 @@
|
|||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9000{homedir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir={homedir}/phptmpdir; \n session.save_path={homedir}/phptmpdir;"
|
||||
|
||||
<FilesMatch "access_log|error_log">
|
||||
Deny from All
|
||||
</FilesMatch>
|
||||
|
||||
{customsubdomainhttp}
|
||||
|
||||
</VirtualHost>
|
||||
|
|
|
@ -15,6 +15,10 @@
|
|||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9000{homedir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir={homedir}/phptmpdir; \n session.save_path={homedir}/phptmpdir;"
|
||||
|
||||
<FilesMatch "access_log|error_log">
|
||||
Deny from All
|
||||
</FilesMatch>
|
||||
|
||||
{customsubdomainhttp}
|
||||
|
||||
</VirtualHost>
|
||||
|
@ -40,6 +44,10 @@
|
|||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9000{homedir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir={homedir}/phptmpdir; \n session.save_path={homedir}/phptmpdir;"
|
||||
|
||||
<FilesMatch "access_log|error_log">
|
||||
Deny from All
|
||||
</FilesMatch>
|
||||
|
||||
{customsubdomainhttp}
|
||||
|
||||
</VirtualHost>
|
||||
|
|
|
@ -20,6 +20,10 @@
|
|||
SSLCertificateKeyFile {ssl_cert_key_path}
|
||||
{ssl_cert_chain_setting_with_path}
|
||||
|
||||
<FilesMatch "access_log|error_log">
|
||||
Deny from All
|
||||
</FilesMatch>
|
||||
|
||||
{customsubdomainhttp}
|
||||
|
||||
</VirtualHost>
|
||||
|
|
Loading…
Reference in a new issue