Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Anyone know how to customise the 404 page? This is if I add a 404 host.

Thanks

You must be logged in to vote

Replies: 2 comments · 6 replies

Comment options

Currently this isn't possible using the app sorry. Will include it as a suggestion though

You must be logged in to vote
6 replies
@jc21
Comment options

jc21 Jul 11, 2021
Maintainer

This is the 404 nginx file template.

For reference, here's the default landing page template. This one will use a setting row within the template to decide what to show.

@jiriteach
Comment options

Awesome - Thanks

@ameinild
Comment options

I would challenge jc21, and say that it's partly possible. Here's what I did:

In my 404 host, under "Advanced", "Custom Nginx Configuration", I inserted this bit of code:

    error_page 404 /custom_404.html;
    location = /custom_404.html {
        root /data/nginx/custom;
        internal;
    }

Then, in the directory /data/nginx/custom (which may be mapped in your setup), I create the file custom_404.html with my custom 404 page.

This works perfectly for me. 👍

@jiriteach
Comment options

Tried this and its working well. Thanks for the pointer @ameinild.

@witnessus
Comment options

I would challenge jc21, and say that it's partly possible. Here's what I did:

In my 404 host, under "Advanced", "Custom Nginx Configuration", I inserted this bit of code:

    error_page 404 /custom_404.html;
    location = /custom_404.html {
        root /data/nginx/custom;
        internal;
    }

Then, in the directory /data/nginx/custom (which may be mapped in your setup), I create the file custom_404.html with my custom 404 page.

This works perfectly for me. 👍

Very good. The simplest solution.

Comment options

Every generated proxy configuration at the bottom has:

# Custom
include /data/nginx/custom/server_proxy[.]conf;

So you could create the data/nginx/custom/server_proxy.conf (which should be mapped to a volume) and configure the 404 there.

This still doesn't work, however, when the hostname itself is not configured, in other words, you still get the default 404.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
5 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.