File tree Expand file tree Collapse file tree 5 files changed +25
-0
lines changed
Expand file tree Collapse file tree 5 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -1008,6 +1008,11 @@ public function install_crontab()
10081008 '* * * * * /usr/local/ispconfig/server/server.sh &> /dev/null ' ,
10091009 '30 00 * * * /usr/local/ispconfig/server/cron_daily.sh &> /dev/null '
10101010 );
1011+
1012+ if ($ conf ['nginx ' ]['installed ' ] == true ) {
1013+ $ root_cron_jobs [] = "0 0 * * * /usr/local/ispconfig/server/scripts/create_daily_nginx_access_logs.sh &> /dev/null " ;
1014+ }
1015+
10111016 foreach ($ root_cron_jobs as $ cron_job ) {
10121017 if (!in_array ($ cron_job ."\n" , $ existing_root_cron_jobs )) {
10131018 $ existing_root_cron_jobs [] = $ cron_job ."\n" ;
Original file line number Diff line number Diff line change @@ -1019,6 +1019,11 @@ public function install_crontab()
10191019 '* * * * * /usr/local/ispconfig/server/server.sh &> /dev/null ' ,
10201020 '30 00 * * * /usr/local/ispconfig/server/cron_daily.sh &> /dev/null '
10211021 );
1022+
1023+ if ($ conf ['nginx ' ]['installed ' ] == true ) {
1024+ $ root_cron_jobs [] = "0 0 * * * /usr/local/ispconfig/server/scripts/create_daily_nginx_access_logs.sh &> /dev/null " ;
1025+ }
1026+
10221027 foreach ($ root_cron_jobs as $ cron_job ) {
10231028 if (!in_array ($ cron_job ."\n" , $ existing_root_cron_jobs )) {
10241029 $ existing_root_cron_jobs [] = $ cron_job ."\n" ;
Original file line number Diff line number Diff line change @@ -1919,6 +1919,11 @@ public function install_crontab() {
19191919 "* * * * * " .$ install_dir ."/server/server.sh > /dev/null 2>> " .$ conf ['ispconfig_log_dir ' ]."/cron.log " ,
19201920 "30 00 * * * " .$ install_dir ."/server/cron_daily.sh > /dev/null 2>> " .$ conf ['ispconfig_log_dir ' ]."/cron.log "
19211921 );
1922+
1923+ if ($ conf ['nginx ' ]['installed ' ] == true ) {
1924+ $ root_cron_jobs [] = "0 0 * * * " .$ install_dir ."/server/scripts/create_daily_nginx_access_logs.sh &> /dev/null " ;
1925+ }
1926+
19221927 foreach ($ root_cron_jobs as $ cron_job ) {
19231928 if (!in_array ($ cron_job ."\n" , $ existing_root_cron_jobs )) {
19241929 $ existing_root_cron_jobs [] = $ cron_job ."\n" ;
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ server {
4646 </tmpl_if>
4747
4848 error_log /var/log/ispconfig/httpd/<tmpl_var name='domain'>/error.log;
49+ access_log /var/log/ispconfig/httpd/<tmpl_var name='domain'>/access.log combined;
4950
5051 ## Disable .htaccess and other hidden files
5152 location ~ /\. {
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin
3+ FILES=/var/log/ispconfig/httpd/*
4+ for f in $FILES
5+ do
6+ mv $f /access.log $f /` date " +%Y%m%d" ` -access.log & > /dev/null
7+ touch $f /access.log & > /dev/null
8+ done
9+ /etc/init.d/nginx reload & > /dev/null
You can’t perform that action at this time.
0 commit comments