Tag Archives: enable

Where is the cron / crontab log? / How to enable the Cron Log?

1. modify rsyslog config: open /etc/rsyslog.d/50-default.conf,remove # before cron.*

pico /etc/rsyslog.d/50-default.conf
Code language: JavaScript (javascript)
[quote] # Default rules for rsyslog. # # For more information see rsyslog.conf(5) and /etc/rsyslog.conf # # First some standard log files. Log by facility. # auth,authpriv.* /var/log/auth.log *.*;auth,authpriv.none -/var/log/syslog cron.* /var/log/cron.log #daemon.* -/var/log/daemon.log kern.* -/var/log/kern.log #lpr.* -/var/log/lpr.log mail.* -/var/log/mail.log #user.* -/var/log/user.log
Code language: PHP (php)

2. chown syslog:admin cron.log

3. restart rsyslog service: sudo service rsyslog restart

sudo service rsyslog restart

4. restart cron service: service cron restart

service cron restart

Now you can check cron log from file cat /var/log/cron.log

How to enable apache2 cache to speed up your website on ubuntu

First enable the mods:

sudo a2enmod file_cache sudo a2enmod headers sudo a2enmod expires
Code language: Bash (bash)

Then edit the virtual host:

pico /etc/apache2/sites-enabled/000-default.conf
Code language: Bash (bash)

And add ifmodule between virtual host:

<VirtualHost *:80> ServerName www.webleit.info ServerAdmin admin@webleit.info DocumentRoot /var/www/html # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, e.g. #LogLevel info ssl:warn ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined #Include conf-available/serve-cgi-bin.conf <IfModule mod_expires.c> # Turn on the module. ExpiresActive on # Set the default expiry times. ExpiresDefault "access plus 2 days" ExpiresByType image/jpg "access plus 1 month" ExpiresByType image/gif "access plus 1 month" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType text/css "access plus 1 month" ExpiresByType text/javascript "access plus 1 month" ExpiresByType application/javascript "access plus 1 month" ExpiresByType text/x-javascript "access plus 1 month" ExpiresByType application/x-shockwave-flash "access plus 1 month" ExpiresByType text/css "now plus 1 month" ExpiresByType image/ico "access plus 1 month" ExpiresByType image/x-icon "access plus 1 month" ExpiresByType text/html "access plus 600 seconds" </IfModule> </VirtualHost> # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Code language: Apache (apache)

Then restart the apache service:

service apache2 restart
Code language: Bash (bash)