2017-11-10 3 views
0

Der eCAP Adapter wird in squid.conf wie konfiguriert:Wie konfiguriert Squid, um benutzerdefinierte Fehlerseiten basierend auf dem Ergebnis von eCAP-Adaptern zurückzugeben?

acl bypass_scan_types_req req_mime_type -i ^text/  
acl bypass_scan_types_req req_mime_type -i ^application/x-javascript 
acl bypass_scan_types_req req_mime_type -i ^application/x-shockwave-flash 
acl bypass_scan_types_req req_mime_type -i ^image/ 
acl bypass_scan_types_req req_mime_type -i ^video  
acl bypass_scan_types_req req_mime_type -i ^audio 

acl bypass_scan_types_req req_mime_type -i ^.*application\/x-mms-framed.*$ 
acl bypass_scan_types_rep rep_mime_type -i ^text/ 
acl bypass_scan_types_rep rep_mime_type -i ^application/x-javascript 
acl bypass_scan_types_rep rep_mime_type -i ^application/x-shockwave-flash 
acl bypass_scan_types_rep rep_mime_type -i ^image/ 
acl bypass_scan_types_rep rep_mime_type -i ^video 
acl bypass_scan_types_rep rep_mime_type -i ^audio 
acl bypass_scan_types_rep rep_mime_type -i ^.*application\/x-mms-framed.*$ 

loadable_modules /usr/local/lib/ecap_clamav_adapter.so 

ecap_service clamav_service_req reqmod_precache uri=ecap://e-cap.org/ecap/services/clamav?mode=REQMOD bypass=off 
ecap_service clamav_service_resp respmod_precache uri=ecap://e-cap.org/ecap/services/clamav?mode=RESPMOD bypass=on 

adaptation_access clamav_service_req allow !bypass_scan_types_req all 
adaptation_access clamav_service_resp allow !bypass_scan_types_rep all 

Bei Virenerkennung, Adapter einige Virus Details und Squid produzieren Standardfehlerseite zurückgibt. Ich möchte eine benutzerdefinierte Fehlerseite statt der Standardseite anzeigen.

Ich habe versucht, indem Sie deny_info hinzufügen, aber ich weiß nicht genau, wie man acl in diesem Fall angeben. Die deny_info Ich habe versucht, ist als:

deny_info custom_error.html <my_acl_here> 

Wo custom_error.html ist bei ~/ecap/squid-XXXX/errors/en/ existieren. Im Moment suche ich nicht nach Virendetails auf der Fehlerseite, es könnte irgendeine statische Seite sein.

Vielen Dank im Voraus!

Antwort

0

fand ich die Lösung, wie:

eine Seite bei /usr/local/squid/share/errors/templates/ERR_ANY_NAME erstellen. Dann fügen Sie am Ende der squid.conf folgende Zeile:

deny_info ERR_ANY_NAME clamav_service_req 

Die clamav_service_req gleiche ist wie in ecap_service Richtlinie gegeben und ERR_ANY_NAME ist eine benutzerdefinierte Seite angezeigt werden soll.

Verwandte Themen