BLπŸ…ΎG News

Actu G33k & Admin stuff. Powered by πŸ…΄πŸ†πŸ†πŸ…΄πŸ†„πŸ†32

β‹… Aucun commentaire

Apache 2.4 Rewrite 404 errors log

debian logoapache Logo

- Create 1 conf file in apacheΒ :

$ nano /etc/apache2/conf-available/rewrite-log-404.conf

- Paste this code inside /etc/apache2/conf-available/rewrite-log-404.conf


RewriteEngine On
# exclude directory index
RewriteCond %{REQUEST_URI} !/index\.(php|html?)$
# exlcude auto-index of directories
RewriteCond %{REQUEST_URI} !/$
# if the request is not a file, directory, or symlink
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l

# set the "notfound" environment variable
RewriteRule ^ - [E=notfound:true,L]

# LogFormat  Vhost log
LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %X" vhost_combined
 
 
CustomLog /var/log/apache2/error.log vhost_combined env=notfound
CustomLog /var/log/apache2/requests.log vhost_combined env=!notfound

- Activate conf with:

$  a2enconf rewrite-log-404

-------------------------------
by πŸ…΄πŸ†πŸ†πŸ…΄πŸ†„πŸ†32

Hosted on
πŸ…΄πŸ…²πŸ…·πŸ”΅πŸ†‚πŸ†ˆπŸ†‚πŸ†ƒπŸ…΄πŸ…Ό

β‹… Aucun commentaire

Fix error rsyslog " rsyslogd-2007: action 'action 17' suspended, next retry is ..."

cat /var/log/syslog | egrep rsyslog

Jun 18 06:25:14 myoueb rsyslogd: [origin software="rsyslogd" swVersion="8.4.2" x-pid="19466" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
Jun 18 06:25:41 myoueb rsyslogd0: action 'action 17' resumed (module 'builtin:ompipe') [try http://www.rsyslog.com/e/0 ]
Jun 18 06:25:41 myoueb rsyslogd-2359: action 'action 17' resumed (module 'builtin:ompipe') [try http://www.rsyslog.com/e/2359 ]
Jun 18 07:39:01 myoueb rsyslogd-2007: action 'action 17' suspended, next retry is Sun Jun 18 07:39:31 2017 [try http://www.rsyslog.com/e/2007 ]
# The named pipe /dev/xconsole is for the `xconsole' utility. To use it,
# you must invoke `xconsole' with the `-file' option:
#
# $ xconsole -file /dev/xconsole [...]
#
# NOTE: adjust the list below, or you'll go crazy if you have a reasonably
# busy site..
#
daemon.*;mail.*;\
news.err;\
*.=debug;*.=info;\
*.=notice;*.=warn |/dev/xconsole
 sed -i '/# The named pipe \/dev\/xconsole/,$d' /etc/rsyslog.conf