LogoLogo
APIDemoOfficial SiteDiscord
  • Introduction
  • Want to help?
  • 💾Installation
    • Prerequisites
      • Installing Webservers
        • Organizr & Dependency Installer
        • Nginx
        • Apache
        • Caddy
      • Installing PHP
    • Installing Organizr
  • 📌Getting started
  • First Time Setup
  • Tab Management
  • 🤖Features
    • Authentication Backend
      • Plex Backend
      • LDAP Backend
    • Server Authentication
      • Nginx Server Authentication
      • Caddy Server Authentication
      • Traefik Server Authentication
    • SSO
      • Plex SSO
      • Tautulli SSO
      • Overseerr SSO
      • Petio SSO
      • Ombi SSO
      • Jellyfin SSO
      • Komga SSO
      • Proxy Auth SSO
        • Grafana SSO
        • NZBHydra2 SSO
        • Calibre SSO
      • Troubleshooting SSO
    • Homepage
      • Sonarr Homepage Item
      • Plex Homepage Item
      • HealthChecks Homepage Item
    • API Socks
    • Backup & Restore
    • Custom Error Pages
    • Fail2Ban Integration
  • 🧪Tweaks
    • Tweaks
    • Hide custom text from specific groups
    • Optimizing PHP-FPM
  • 🆘Help
    • Custom Work
      • Custom Pages
    • Tutorials
      • Reverse Proxies
    • FAQ
      • Organizr Requirements
      • Forgot my password
      • Organizr Login Error
      • Login Looping - SameSite Errors
      • Auth cookie is not used by other subdomains
      • Update available even though up to date
      • Migration Guide
  • 🌍 Development
    • Plugin Development
Powered by GitBook
On this page
  • Summary
  • Breakdown
  • URL Breakdown
  • NGINX Example for Proxies
  • Organizr Reverse Proxy

Was this helpful?

Export as PDF
  1. Features

Custom Error Pages

PreviousBackup & RestoreNextFail2Ban Integration

Last updated 3 years ago

Was this helpful?

Summary

Organizr comes with integrated error pages, they have to be configured in the webserver.

It accepts most error codes, and can do a redirect when the user has acknowledged the error.

Breakdown

The full Syntax for the error page is:

$scheme://$server_name/api/v2/organizr/error/$status?return=$request_uri;

URL Breakdown

Type

Breakdown

$scheme://$server_name

This will translate to the URL to the domain that the servers gets the request from. i.e.

https://organizr.app

/api/v2/organizr/error/

Path to the error page

$status

This will set the correct Status code for the error page

?return=$request_uri

OPTIONAL: This will let Organizr know to redirect the user once they have logged in

You may set custom ones with predefined URLs

https://organizr.app/api/v2/organizr/error/401?return=https://demo.organizr.app

To get error pages to work with a reverse proxies, you may need to tell the webserver to intercept the errors from the service.

In NGINX the way to do this is with proxy_intercept_errors on;

This can break some services (like plex), add proxy_intercept_errors off; to the location if that is the case.

NGINX Example for Proxies

# This is using nginx's built-in variables, should be copy-paste for most setups.
error_page 401 $scheme://$server_name/api/v2/organizr/error/$status?return=$request_uri; # We only want the Unauthorized code to redirect back to the loginpage

error_page 400 402 403 404 405 408 500 502 503 504  $scheme://$server_name/api/v2/organizr/error/$status; # Responds with the errorpage for the errorcodes listed

For Subdomain's, we replaced $server_name with the domain organizr is on.

error_page 401 $scheme://organizr.app/api/v2/organizr/error/$status?return=$scheme://$host$request_uri; # We only want the Unauthorized code to redirect back to the loginpage

error_page 400 402 403 404 405 408 500 502 503 504  $scheme://organizr.app/api/v2/organizr/error/$status; # Responds with the errorpage for the errorcodes listed

Organizr Reverse Proxy

If you have Organizr Reversed Proxied, which we are sure you do. You need to add an additional block for the API so it doesn't overwrite the errors for it.

location /api {
    include /config/nginx/proxy.conf; # Replace with any proxy config options
    proxy_pass http://organizr-ip:organizr-port;
    proxy_intercept_errors off; # This is the important part
}

🤖
HTTP Error Code (Status Codes)