strace
2011-05-19 | 9:23 pm | 1 Kommentar »
lalalaaa
cd /etc/apache2
. ./envvars
apache2ctl stop
strace -f -s 512 apache2 -X 2> /tmp/blub
niemals vergessen
2009-12-1 | 11:56 pm | Kein Kommentar »
mysql
$where = „itemtype='“. mysql_real_escape_string($string);
$where = sprintf(„id=%d“, $id);
php
$h2 = htmlspecialchars($_REQUEST[„itype“]);
awstats
2008-06-2 | 5:00 pm | 1 Kommentar »
Installation
als Debianpaket: apt-get install awstats
Webverzeichnis /var/www/awstats
im Webverzeichnis ln -s /usr/lib/cgi-bin/awstats.pl awstats.pl
awstats.pl ist sowohl cgi als auch skript
Aufruf als cgi uebers web: http://blueDomain/awstats.pl?config=blueDomain
Iconverzeichnis
Konfiguration in /etc/awstats/awstats.conf => „icon“
im Webverzeichnis ln -s /usr/share/awstats/icon icon
Datenverzeichnis /var/lib/awstats
bzw. bei mehreren vhosts entsprechende Unterverzeichnisses
/var/lib/awstats/redDomain
/var/lib/awstats/blueDomain
Konfiguration /etc/awststats/awstats.conf
bzw. bei mehreren vhosts
/etc/awstats.redDomain.conf
/etc/awstats.blueDomain.conf
|
Weitere Konfig-Parameter
LogFormat=1 fuer apache combined logs
SkipHosts= „127.0.0.1 localhost REGEX[^87\.177\.]“
UseFramesWhenCGI=0
ShowFlagLinks=“de en fr“
Nach Konfigfileaenderung: Statistik erneuern
Betrifft die Aenderung im Konfigfile Parameter, die auf die Daten im Datenverzeichnis Einfluss haben, muss der Inhalt des Datenverzeichnisses geloescht werden. Erst dann die Statistik erneuern, denn alte Logzeilen werden nicht nochmal neu ausgewertet, sondern von awstats als „schon ausgewertet“ behandelt.
Statistik erzeugen und erneuern
perl /var/lib/cgi-bin/awstats.pl -config=blueDomain
Taegliches Statistkerneuern mit logrotate/prerotate
In /etc/logrotate.d/apache2
prerotate
/pfad/bin/awstatsUpdate.sh
endscript
In /pfad/bin/awstatsUpdate.sh
perl /usr/lib/cgi-bin/awstats -config=blueDomain
perl /usr/lib/cgi-bin/awstats-config=redDomain
links
achja hier waers ja schon gestanden:
embperl
2007-07-7 | 1:47 am | 1 Kommentar »
Installation von embperl und mod_perl
apt-get install lib-embperl-perl lib-mod-perl
http.conf
LoadModule perl_module /usr/lib/apache/1.3/mod_perl.so
Add Type text/html *.epl
<FILES *.epl>
SetHandler perl-script
PerlHandler Embperl
Options Exec CGI
</FILES>
=> apachectl restart bzw. /etc/init/apache restart :)
embperl
[+ $a +]
[- use BlaModule -]
[! Definition perlfkt !]
[* foreach $i (1,2) { *] [* } *]
[# Kommentar #]
[$ Cmd Arg $]
cut [raetsel]
2007-07-6 | 11:09 pm | Kein Kommentar »
Was macht das?
grep blablub access.log | cut -d \ -f11 | sort | uniq -c
More …
virtuelle hosts
2007-07-6 | 6:51 pm | Kein Kommentar »
in /etc/hosts
127.0.0.1 localhost blablub.hermione
in http.conf
Name VirtualHost 127.0.0.1
<Virtual Host 127.0.0.1>
DocumentRoot /var/www/blablub
ServerName blabblub.hermione
</VirtualHost>
server side includes
2007-07-6 | 6:51 pm | Kein Kommentar »
debian paket installieren: libapache-ssi-perl
modules.conf:
LoadModule includes_module /usr/bin/lib/apache/../mod_include.so
httpd.conf:
AddType text/html .shtml
AddHandler server-parced .html
apache installation
2007-06-18 | 5:20 pm | Kein Kommentar »
merkzettel der wichtigsten pakete
sudo apt-get install […]
- apache2
- php5, libapache-mod-php5
- php5-mysql
- php5-gd
- mysql-server, mysql-client
- libdbd-mysql-perl
sudo apache2ctl restart
sudo chown hanna /var/www :>
.htaccess [apache]
2007-06-2 | 5:51 pm | Kein Kommentar »
Verzeichnisse mit Passwort schützen
# .htaccess Datei fuer /rezepte/ AuthType Basic AuthName „Rezepte“ AuthUserFile /var/blablub/.htusers Require user valid-user |
Auth Type Basic steht fuer HTTP Basic Authentication.
AuthUserFile enthaelt die Usernamen-Passwort Daten.
valid-user steht fuer alle gueltigen User.
Erstellen der User Datei .htusers
htpasswd -bc .htusers gast gast htpasswd -b ralph geheimespasswort usw. |
htpasswd -h hilft weiter :)