スポンサーサイト
一定期間更新がないため広告を表示しています
- 2023.06.28 Wednesday
- -
- -
- -
- by スポンサードリンク
AuthUserFile /etc/.htpasswd
AuthGroupFile /dev/null
AuthName "Please enter username and password"
AuthType Basic
<Limit GET>
require user UserName
</Limit>
# chmod 644 .htaccess
# httpasswd -c .htpasswd UserName
New password: *********
Re-type new password: *********
Adding password for user UserName
AddHandler cgi-script htaccess txt text dat data csv
Options -Indexes
ErrorDocument 401 /404.html
ErrorDocument 403 /404.html
ErrorDocument 404 /404.html
ErrorDocument 500 /404.html
# vinstall urchin -j
# vinstall urchin -j
# vinstall urchin -j
LogEncoding: jp
#ProcessDNS: on
#ResolverIP: 127.0.0.1
↓
ProcessDNS: on
ResolverIP: 127.0.0.1
# cd /usr/local/urchin/
# cp config config_old2
# vi config
# cd /etc
# vi newsyslog_web.conf
# logfilename [owner:group] mode count size when [ZJB] [/pid_file] [sig_num]
/www/logs/access_log 644 7 1 * Z
/www/logs/error_log 644 7 1 * Z
# cd /root
# vi newsyslog_web.pl
#!/usr/bin/perl -w
use strict;
my $res;
$res = system "/usr/local/apache/bin/apachectl configtest";
# When httpd.conf has syntax error, log rotation is not executed.
if ($res == 0) {
# execute urchin command
system("/usr/local/urchin/urchin");
# execute newsyslog on web logs
system("/usr/sbin/newsyslog -f /etc/newsyslog_web.conf");
# execute restart_apache
system("/usr/local/sbin/restart_apache");
}
# chmod 600 newsyslog_web.pl
# /usr/bin/perl /root/newsyslog_web.pl
+E WARNING(112): Invalid license.
The license did not match this product on this system.
Please contact tech support if you have a question.
Continuing...
+U Urchin Dedicated starting: 20040622 18:11:32
+L License: Expired demo license.
Syntax OK
/usr/local/apache/bin/apachectl stop: httpsd stopped
/usr/local/apache/bin/apachectl start: httpsd started
# vi cron.txt
TZ=Asia/Tokyo
30 23 * * * /usr/bin/perl /root/newsyslog_web.pl > /dev/null 2>&1
# crontab cron.txt
# crontab -l
> su
Password:***********
You have mail. #-- なんだこれ?--#
/home# cd /
/#
# vinstall urchin
vinstall done
/# cp /usr/local/urchin/config /usr/local/urchin/config_old
/# ls -l /usr/local/urchin/
-rw-r--r-- 1 root bin 4554 Jun 9 16:02 config
-rw-r--r-- 1 root bin 4554 Jun 9 16:17 config_old
/#
/# vi /usr/local/urchin/config
RestartCommand: /usr/local/sbin/restart_apache
LogDestiny: archive
↓ (コメントアウト「#」記号を追加)
#RestartCommand: /usr/local/sbin/restart_apache
#LogDestiny: archive
-----