Pour que les pages d'erreur d'Apache aient un joli aspect, on peut les modifier de la facon suivante :
/usr/share/apache2/error/include/top.html
<!--#if expr="! $CONTENT_LANGUAGE"
--><!--#set var="CONTENT_LANGUAGE" value="en"
--><!--#endif
--><!--#if expr="! $CHARACTER_ENCODING"
--><!--#set var="CHARACTER_ENCODING" value="ISO-8859-1"
--><!--#endif
--><?xml version="1.0" encoding="<!--#echo var="CHARACTER_ENCODING" -->"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="<!--#echo var="CONTENT_LANGUAGE" -->" xml:lang="<!--#echo var="CONTENT_LANGUAGE" -->">
<head>
<title><!--#echo encoding="none" var="TITLE" --></title>
<link rev="made" href="mailto:<!--#echo encoding="url" var="SERVER_ADMIN" -->" />
<style type="text/css"><!--/*--><![CDATA[/*><!--*/
    body { color: #000000; background-color: #FFFFFF; margin: 10% 20% auto 20%; font: 10px Verdana, Arial, Helvetica, sans-serif }
    #errorbox {border: 1px solid #B84623}
    h2 { margin: 0; color: #ffffff; background-color: #b84623; font-size: 1.1em; padding: 5px 4px}
    #errorbox div {padding: 6px 5px; background-color: #F1F1F1}
    a:link { color: #0000CC; }
    p, address {margin-left: 3em;}
    span {font-size: smaller;}
/*]]>*/--></style>
</head>

<body>
<div id="errorbox">
  <h2><!--#echo encoding="none" var="TITLE" --> - Error <!--#echo encoding="none" var="REDIRECT_STATUS" --></h2>
  <div>
/usr/share/apache2/error/include/bottom.html
<p>
<!--#include virtual="../contact.html.var" -->
</p>

<h2>Contact :</h2>
<address>
  <a href="/"><!--#echo var="SERVER_NAME" --></a>
  <!--#config timefmt="%c" -->
  <span><!--#echo var="DATE_LOCAL" -->
  <!--#echo var="SERVER_SOFTWARE" --></span>
</address>
</div>
</div>
</body>
</html>

Il faut de plus activer dans /etc/apache2/apache2.conf les fichiers erreurs et le module include par la commande a2enmod include && /etc/init.d/apache2 force-reload.
Des cookies d'analyse d'audience sont utilisés sur ce site