Apache
  Home arrow Apache arrow Page 3 - Custom Error Pages with Apache
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
APACHE

Custom Error Pages with Apache
By: Dan Wellman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 11
    2006-04-03


    Table of Contents:
  • Custom Error Pages with Apache
  • Creating a custom error page
  • Internationalized error pages
  • Maintaining and updating error pages

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Custom Error Pages with Apache - Internationalized error pages
    ( Page 3 of 4 )

    You needn’t stop there however; if you scroll down through the conf file just a little more, you’ll see a section covering "internationalized error messages" which work on a system of master error pages, containing standard error messages in many different languages, repeated throughout the file:

     

    At run time, when an error occurs, the error page is constructed using server-side includes to build the page from several template html files (bottom, top and spacer), and content-negotiation to grab the actual text for the error message in the preferred language.

    If you go to the error page directory in the Apache program folder, which is C:\Program Files\Apache Group\Apache2\error on a default Windows installation, you can see all of the internationalized error pages, and within this folder is also the include folder containing the header, footer and spacer pages.

    To switch this feature on, you need to copy everything from the Apache error directory to a directory in your sites hierarchy, then uncomment out the block of lines beginning with the Alias directory and ending with the ErrorDocument 506 directive.  Finally, the Alias directive needs to be changed so that it shows the path to the directory you have just created; you also need to update the Directory container to show the same path.  Don’t forget that the Windows standard backslashes need to be changed to forward slashes before the paths will be accepted by Apache. 

    When you try this, make sure that you comment out any of the ErrorDocument directives used previously.  Also, note that when this is configured correctly and works, you don’t need to worry about whether or not the internationalized error messages will be shown in Internet Explorer – they will, even with the "show friendly error messages" preference set because the server-generated page is greater than 512 bytes.



     
     
    >>> More Apache Articles          >>> More By Dan Wellman
     

       

    APACHE ARTICLES

    - Creating a VAMP (Vista, Apache, MySQL, PHP) ...
    - Putting Apache in Jail
    - Containing Intrusions in Apache
    - Server Limits for Apache Security
    - Setting Permissions in Apache
    - Installing Apache
    - Apache Installation and Configuration
    - Apache Tapestry and Custom Components: DateI...
    - Tapestry and AJAX: Autocompleter and InlineE...
    - PropertySelection and IPropertySelectionMode...
    - The DatePicker and Shell Components of Apach...
    - Apache Tapestry: ASO and More Components
    - Apache Tapestry and DirectLink, IoC and DI
    - Making a CelebrityCollector with Apache Tape...
    - Apache Tapestry and Listener Methods, Condit...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    Stay green...Green IT