Apache Custom Error Pages Download
Contents |
Support Search GitHub This repository Watch 4 Star 35 Fork 10 AndiDittrich/HttpErrorPages Code Issues 0 Pull requests apache custom 404 error page 0 Projects 0 Pulse Graphs ⚠️ Simple HTTP Error Page Generator
Apache Custom 500 Error Page
8 commits 1 branch 4 releases Fetching contributors MIT HTML 77.3% CSS 17.2% PHP 5.5% HTML CSS apache custom error log virtualhost PHP Clone or download Clone with HTTPS Use Git or checkout with SVN using the web URL. Open in Desktop Download ZIP Find file Branch: master Switch branches/tags
Apache Set 404 Page
Branches Tags master Nothing to show v0.3 v0.2 v0.1 list Nothing to show New pull request Latest commit 0331dac Aug 3, 2016 AndiDittrich committed on GitHub Fixed #1 … Added a working nginx example how to set up the error pages Permalink Failed to load latest commit information. Build removed bootstrap; added php template php custom error page Feb 28, 2015 Config removed bootstrap; added php template Feb 28, 2015 Resources removed bootstrap; added php template Feb 28, 2015 .gitignore initial commit Jan 11, 2015 CHANGES.md removed bootstrap; added php template Feb 28, 2015 LICENSE.md initial commit Jan 11, 2015 README.md Fixed #1 Aug 3, 2016 generator.php removed bootstrap; added php template Feb 28, 2015 pages.php Added Custom HTTP533 Jan 21, 2015 screenshot1.png initial commit Jan 11, 2015 template.phtml removed bootstrap; added php template Feb 28, 2015 README.md Simple HttpErrorPages Simple HTTP Error Page Generator. Create a bunch of custom error pages - suitable to use with Lighttpd, Nginx, Apache or Tomcat. Demo HTTP400 HTTP401 HTTP403 HTTP404 HTTP500 HTTP501 HTTP502 HTTP503 HTTP520 HTTP521 Integration Lighttpd Lighttpd supports custom error-pages using the server.errorfile-prefix directive. File: lighttpd.conf Example - assumes HttpErrorPages are located into /var/www/ErrorPages/. server.errorfile-prefix = "/var/www/ErrorPages/HTTP" Apache Httpd Apache Httpd 2.x supports custom error-pages using multiple ErrorDocument directives. File: httpd.conf or .htaccess Example - assumes HttpErrorPages are located into your document root /var/www/.
In submit Tutorials Questions Projects Meetups Main Site logo-horizontal DigitalOcean Community Menu Tutorials Questions Projects Meetups Main Site Sign Up Log In submit View All Results By: Justin Ellingwood Subscribe Subscribed Share Contents Contents We hope you find
Tomcat Custom Error Page
this tutorial helpful. In addition to guides like this one, we provide simple cloud infrastructure
Apache Errordocument
for developers. Learn more → 6 How To Configure Apache to Use Custom Error Pages on Ubuntu 14.04 Posted Jun 9, 2015 44.6k apache 404 error views Apache Ubuntu Introduction Apache is the most popular web server in the world. It is well-supported, feature-rich, and flexible. When designing your web pages, it is often helpful to customize every piece of content that your https://github.com/AndiDittrich/HttpErrorPages users will see. This includes error pages for when they request content that is not available. In this guide, we'll demonstrate how to configure Apache to use custom error pages on Ubuntu 14.04. Prerequisites To get started on with this guide, you will need a non-root user with sudo privileges. You can set up a user of this type by following along with our initial set up guide for Ubuntu 14.04. You will also need https://www.digitalocean.com/community/tutorials/how-to-configure-apache-to-use-custom-error-pages-on-ubuntu-14-04 to have Apache installed on your system. Learn how to set this up by following the first step of this guide. Creating Your Custom Error Pages We will create a few custom error pages for demonstration purposes, but your custom pages will obviously be different. We will put our custom error pages in the /var/www/html directory where Ubuntu's Apache installation sets its default document root. We'll make a page for 404 errors called custom_404.html and one for general 500-level errors called custom_50x.html. You can use the following lines if you are just testing. Otherwise, put your own content in these locations:
- echo "
Error 404: Not found :-(
" | sudo tee /var/www/html/custom_404.html - echo "
I have no idea where that file is, sorry. Are you sure you typed in the correct URL?
" | sudo tee -a /var/www/html/custom_404.html - echo "
Oops! Something went wrong...
" | sudo tee /var/www/html/custom_50x.html - echo "
We seem to be having some technical difficulties. Hang tight.
" | sudo tee -a /var/www/html/custom_50x.html We now have two custom error pages that we can serve when client requests result in different errors. Configuring Apache to Use your Error Pages Now, we just need to tell Apache that it should be utilizing these pages whenever the correct error conditions occur. Open the virtual host file in the /C programming language Checkstyle Cloudscape CVSNT Cygwin Docker Dojo DBDesigner 4 Drupal Eclipse Ethereal Firefox Flash Flex Git HTML Tidy ImageMagick James Java Decompiler Java Media Framework http://www.mobilefish.com/developer/apache/apache_quickguide_errorpages.html Java 2 Enterprise Edition SDK Java 2 Mobile Edition Java 2 Standard Edition SDK Java Web Start JBoss Jetty JOAL JOGL Libnfc Log4j LoRaWAN Mambo Maven MircoEmulator Microsoft http://www.onlamp.com/pub/a/onlamp/2003/02/13/davidsklar.html Visual C++ Toolkit 2003 Mobile 3D Graphics API (M3G) MongoDB MySQL Node.js OpenCms OpenSSL Oracle VM VirtualBox Oro Perl / ActivePerl PHP Raspberry Pi Retroguard Struts Sun ONE Studio error page 4, Mobile Edition Taglibs Tomcat Ubuntu WebGL WebSphere Application Server Community Edition WebSphere Studio Application Developer WURFL WinCVS Xcode XDoclet Xith3D Translate this page Select Language: Afrikaans Albanian Arabic Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch Estonian Filipino Finnish French Galician German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean custom error page Latvian Lithuanian Macedonian Malay Maltese Norwegian Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Vietnamese Welsh Yiddish Print this page Share Mobilefish Firefox search plugin Mobilefish button for Google toolbar Google+ Apache Apache is a powerful and flexible HTTP/1.1 compliant web server. Originally designed as a replacement for the NCSA HTTP Server, it has grown to be the most popular web server on the Internet. As a project of the Apache Software Foundation, the developers aim to collaboratively develop and maintain a robust, commercial-grade, standards-based server with freely available source code. The Apache HTTP Server is distributed at no charge for commercial or non-commercial use. For more information read the LICENSE.txt file. Apache can be used with Microsoft Windows. The Apache HTTP Server Version 2.0 runs under Windows NT, Windows 2000 and Windows XP. You should download the version of Apache for Windows with the .msi extension. This is a single Microsoft Installer file containing Apache, ready to i
Error Pages with PHP and Apache by David Sklar, coauthor of PHP Cookbook 02/13/2003 Using PHP and Apache, you can turn your "Page Not Found" messages into more than bland error reports. You can serve an alternate page based on the name of the page that was not found, create a page on the fly from a database, or send an email about the missing page to a webmaster. Building a custom error page with PHP and Apache requires two steps. You need to tell Apache to run a PHP program when it encounters a 404 ("Page Not Found") error. And you need to write the corresponding program that takes the appropriate action. Configuring Apache To tell Apache what to do on a 404 error, use the ErrorDocument directive: ErrorDocument 404 /error-404.php This tells Apache to serve up error-404.php in the document root directory when it encounters a 404 error. The ErrorDocument directive can go in Apache's httpd.conf file, but it also works in .htaccess files in individual directories. You can have a site-wide error-handling page or different error-handling pages for different parts of your site. Apache also sets some server variables that the error-handling page can access: Related Reading PHP Cookbook By David Sklar, Adam Trachtenberg REDIRECT_URL: the URL-path that was not found. If a user asks for the nonexistent page http://www.example.com/lunch/pastrami.html, for example, this variable is set to /lunch/pastrami.html. REDIRECT_STATUS: the HTTP response status resulting from the request for the original page. In our case, this is always "404". You can use ErrorDocument with other status codes, though, so if you have one error-handling page for multiple statuses, you can use this variable to determine which error status caused the error-handling page to be loaded. REDIRECT_ERROR_NOTES: a brief description of what went wrong, for example, "File does not exist: /usr/local/apache/docroot/lunch/pastrami.html". REDIRECT_REQUEST_METHOD: the method