This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Seperate PHP error logs per domain,
#8
RE: Seperate PHP error logs per domain,
You can create php error logs for each domain in two ways:
1. .htaccess method

Code:
# enable PHP error logging
php_flag  log_errors on
php_value error_log  C:\Sentora\logs\php\php_error_your_domain_name.log

Add this into your .htaccess file

2.Virtual host method

=> open OnDaemonRun.hook.php file in C:\Sentora\panel\modules\apache_admin\hooks
 
find    ## Regular Domain or Subdomain ## part

Add this:


Code:
$line .= '    php_admin_value log_errors on' . fs_filehandler::NewLine();
$line .= '    php_admin_value error_log "' . ctrl_options::GetSystemOption( 'log_dir' ) . "domains/" . $vhostuser[ 'username' ] . "/" . $rowvhost[ 'vh_name_vc' ] . '-phperror.log" ' . fs_filehandler::NewLine();



after ErrorLog  and Customlog part.

Code:
$line .= ' ErrorLog "' . ctrl_options::GetSystemOption( 'log_dir' ) . "domains/" . $vhostuser[ 'username' ] . "/" . $rowvhost[ 'vh_name_vc' ] . '-error.log" ' . fs_filehandler::NewLine();
$line .= ' CustomLog "' . ctrl_options::GetSystemOption( 'log_dir' ) . "domains/" . $vhostuser[ 'username' ] . "/" . $rowvhost[ 'vh_name_vc' ] . '-access.log" ' . ctrl_options::GetSystemOption( 'access_log_format' ) . fs_filehandler::NewLine();


You can check php logs of domains in sentora -> logs -> domains folder with this modification.
Reply
Thanks given by:


Messages In This Thread
RE: Seperate PHP error logs per domain, - by muratkaragoz - 05-24-2020, 11:42 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
My domain always redirect to control panel login page khir 3 14 ,581 05-25-2020, 12:04 AM
Last Post: muratkaragoz
AWServer with ZPanelX 2.2 - Domain Connections Refused - language files - n more odinwynd 20 61 ,035 05-28-2017, 05:05 AM
Last Post: TGates
Error 500 Issues! chiefody 3 10 ,414 03-04-2017, 06:42 AM
Last Post: cathelest

Forum Jump:


Users browsing this thread: 2 Guest(s)