GithubHelp home page GithubHelp logo

bartosjiri / nginx-errors Goto Github PK

View Code? Open in Web Editor NEW
57.0 2.0 19.0 221 KB

A set of custom minimalist 4xx and 5xx error pages for Nginx.

HTML 77.09% CSS 22.91%
nginx nginx-error error-page minimalist

nginx-errors's Introduction

Minimalist Nginx error pages

A set of custom minimalist 4xx and 5xx error pages for Nginx.

Preview

404 error page

Installation

  1. Navigate into Nginx's default document directory:

    cd /usr/share/nginx/html
    
  2. Clone the repository:

    git clone https://github.com/bartosjiri/nginx-errors.git
    
  3. Add the custom error pages to the server's default configuration in /etc/nginx/sites-enabled/default file:

    server {
    ...
    include /usr/share/nginx/html/nginx-errors/nginx-errors.conf
    }
    
  4. Verify the configuration and reload Nginx:

    sudo nginx -t
    sudo service nginx reload
    

nginx-errors's People

Contributors

bartosjiri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

nginx-errors's Issues

nginx: [emerg] unexpected "}"

In the README.md there is a missing semicolon after the include.

server {
...
include /usr/share/nginx/html/nginx-errors/nginx-errors.conf;
}

401 error page not loaded, set auth_basic off;

if auth_basic is enabled, the default 401 error page will be shown, not the styled one.

to fix this, the error locations should have auth_basic off;

nginx-errors.conf:

...

location ^~ /nginx-errors/errors/ {
    auth_basic off;
    ssi on;
    internal;
    root /usr/share/nginx/html;
}

location ^~ /assets/css/style.css {
    auth_basic off;
    root /usr/share/nginx/html/nginx-errors/errors;
}

location ~* montserrat-(400|700).(eot|woff2|woff|ttf|svg) {
    auth_basic off;
    root /usr/share/nginx/html/nginx-errors/errors;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.