Eigene Fehlerseite in Apache!

Alles, was den Apache betrifft, kann hier besprochen werden.

Eigene Fehlerseite in Apache!

Postby Jürgen2 » 05. June 2004 11:43

Hallo,

habe mir viele Beiträge durch gelesen, bin aber nicht fündig geworden!

Ich hatte schon eine ältere Vorgängerversion des Apache und mir dort eine eigene Fehlerseite erstellt.
War relativ einfach zu bewältigen.

Vor einigen Tagen hatte ich mir den neusten Xampp für Windows herunter geladen. Läuft eigentlich alles bis auf die Fehlerseite.

Habe alles entsprechende geändert, aber es kommt immer noch die Standardfehlermeldung.

Gibt es in dieser neuen Version noch etwas anderes, was ichzusätzlich edditieren muss?

Wer kennt sich aus?

Mfg. Birgit
Jürgen2
 
Posts: 7
Joined: 28. May 2004 13:02

Re: Eigene Fehlerseite in Apache!

Postby Wiedmann » 05. June 2004 11:46

Gibt es in dieser neuen Version noch etwas anderes, was ich zusätzlich edditieren muss?


Zusätzlich zu was? Was hast du gemacht um deine eigene Fahlerseite einzubinden?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Jürgen2 » 05. June 2004 18:30

Hallo Wiedermann,

ich hatte bislang folgende Einträge geändert:
Hatte mir die 404.html erstellt und in dem Ordner "error" kopiert!
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /error/404.html
#ErrorDocument 404 /error/404.html
#ErrorDocument 402 /error/404.html
#

#
# Putting this all together, we can Internationalize error responses.
#
# We use Alias to redirect any /error/HTTP_<error>.html.var response to
# our collection of by-error message multi-language collections. We use
# includes to substitute the appropriate text.
#
# You can modify the messages' appearance without changing any of the
# default HTTP_<error>.html.var files by adding the line;
#
# Alias /error/include/ "/your/include/path/"
#
# which allows you to create your own set of files by starting with the
# /xampp/apache/error/include/ files and
# copying them to /your/include/path/, even on a per-VirtualHost basis.
#

<IfModule mod_negotiation.c>
<IfModule mod_include.c>
Alias /error/ "/xampp/apache/error/"

<Directory "/xampp/apache/error">
AllowOverride None
Options IncludesNoExec
AddOutputFilter Includes html
AddHandler type-map var
Order allow,deny
Allow from all
LanguagePriority en es de fr
ForceLanguagePriority Prefer Fallback
</Directory>

ErrorDocument 400 /error/404.html
ErrorDocument 401 /error/404.html
ErrorDocument 403 /error/404.html
ErrorDocument 404 /error/404.html
ErrorDocument 405 /error/404.html
ErrorDocument 408 /error/404.html
ErrorDocument 410 /error/404.html
ErrorDocument 411 /error/404.html
ErrorDocument 412 /error/404.html
ErrorDocument 413 /error/404.html
ErrorDocument 414 /error/404.html
ErrorDocument 415 /error/404.html
ErrorDocument 500 /error/404.html
ErrorDocument 501 /error/404.html
ErrorDocument 502 /error/404.html
ErrorDocument 503 /error/404.html
ErrorDocument 506 /error/404.html

</IfModule>
</IfModule>
Jürgen2
 
Posts: 7
Joined: 28. May 2004 13:02

Postby Wiedmann » 05. June 2004 19:11

<IfModule mod_negotiation.c>
<IfModule mod_include.c>

*Schnipp*

ErrorDocument 400 /error/404.html

*Schnipp*

</IfModule>
</IfModule>

Da mod_negotation standardmäßig nicht (mehr) geladen wird, werden die Anweisungen innerhalb des IfModule-Blocks ignoriert.

Du kannst jetzt entweder das Modul aktivieren:
LoadModule negotiation_module modules/mod_negotiation.so
(ca. Zeile 165, das "#" wegmachen)

Wenn das eine ganz simple html-Datei ist, kannst du auch folgende Zeilen mit "#" auskommentieren:
#<IfModule mod_negotiation.c>
#<IfModule mod_include.c>
#Options IncludesNoExec
#AddOutputFilter Includes html
#AddHandler type-map var
#LanguagePriority en es de fr
#ForceLanguagePriority Prefer Fallback
#</IfModule>
#</IfModule>

In diesen zwei Zeilen solltest du auch nach möglichkeit den korrekten Pfad zu dem Verzeichnis eintragen, inkl. Laufwerk:
Alias /error/ "C:/xampp/apache/error/"
<Directory "C:/xampp/apache/error">
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany


Return to Apache

Who is online

Users browsing this forum: No registered users and 402 guests