eigene Templates anlegen
Verfasst: Fr 27.07.2007, 17:16
Wenn man bestimmte Dateien abändern möchte, diese jedoch noch nicht als Template existieren, können auch eigene Templates angelegt werden. Als Beispiel wird hier die Änderung einer "Errorseite" vom Squid gezeigt.
Die Webseite, die der Squid anzeigt, wenn eine Seite über die URL gesperrt wurde generiert das Programm aus der Datei /etc/squid/errors/ERR_ACCESS_DENIED
Für diese Datei legen wir nun ein Template an:
danach wird das Template einfach eingefügt:
mit der Eingabe von "**" wird das Template gespeichert. Um das Template zu aktivieren, muss der HTTP_Proxy neu gestartet werden.
Genauso kann z.B. auch mit den Templates vom Dansguardian umgegangen werden.
Das Speichern der Konfiguration nicht vergessen!
Die Webseite, die der Squid anzeigt, wenn eine Seite über die URL gesperrt wurde generiert das Programm aus der Datei /etc/squid/errors/ERR_ACCESS_DENIED
Für diese Datei legen wir nun ein Template an:
Code: Alles auswählen
add extc_template http_proxy /etc/squid/errors/ERR_ACCESS_DENIED
Code: Alles auswählen
#HDR:APP http_proxy
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Securepoint Error Message - Cache Access Denied</title>
<style type="text/css">
* {
margin: 0;
padding: 0;
}
body {font-weight:normal; font-size:10px; color:#000000; font-family:Verdana, Arial, sans-serif}
.normal {font-weight:normal; font-size:10px; color:#000000; font-family:Verdana, Arial, sans-serif}
.normalbold {font-weight:bold; font-size:10px; color:#000000; font-family:Verdana, Arial, sans-serif}
.normalboldred {font-weight:bold; font-size:10px; color:#ff0000; font-family:Verdana, Arial, sans-serif}
.denied {font-weight:bold; font-size:28px; color:red; font-family:Verdana, Arial, sans-serif}
</style>
</head>
<body bgcolor=#ffffff marginheight=0 marginwidth=0 topmargin=0 leftmargin=0>
<center>
<table border=0 cellspacing=0 cellpadding=0 width=700>
<tr>
<td bgcolor=#FFFACD height=1 align=center class=normal><hr></td>
</tr>
<tr>
<td bgcolor=#FEA700 height=100 align=center class=denied>ERROR: Access Denied</td>
</tr>
<tr>
<td bgcolor=#FFFACD height=1 align=center class=normal><hr></td>
</tr>
<tr>
<td bgcolor=#FFFACD height=20 align=center class=normal></td>
</tr>
<tr>
<td bgcolor=#FFFACD height=40 align=center class=normal>While trying to retrieve the URL:</td>
</tr>
<tr>
<td bgcolor=#FFFACD height=40 align=center class=normal><a href="%U" target="_blank" class=normalboldred>%U</a></td>
</tr>
<tr>
<td bgcolor=#FFFACD height=40 align=center class=normal>The following error was encountered:</td>
</tr>
<tr>
<td bgcolor=#FFFACD height=40 align=center class=normalbold>Access Denied</td>
</tr>
<tr>
<td bgcolor=#FFFACD height=100 align=center class=normal>
Access control configuration prevents your request from being allowed at this time.
Please contact your service provider if you feel this is incorrect.
Your cache administrator is <a href="mailto:%w" class=normalbold>%w</a>.
</td>
</tr>
<tr>
<td bgcolor=#FFFACD height=1 align=center class=normal><hr></td>
</tr>
<tr>
<td bgcolor=#DDDDDD align=center class=normal>
Securepoint GmbH, Salzstrasse 1, 21335 Lueneburg, Germany,
Email: <a href="mailto:info@securepoint.cc" class=normal>info@securepoint.cc</a>,
Internet: <a href="http://www.securepoint.cc/" target=_blank class=normal>http://www.securepoint.cc/</a>
</td>
</tr>
<tr>
<td bgcolor=#FFFACD height=1 align=center class=normal><hr></td>
</tr>
</table>
Code: Alles auswählen
restart application SERVICE_HTTP_PROXY
Das Speichern der Konfiguration nicht vergessen!