Using a custom 404 page

Questions and discussions about Indie Computing's UBOSbox
Post Reply
criky
Posts: 76
Joined: Fri Jul 05, 2019 4:24 am

Using a custom 404 page

Post by criky »

Greetings :)

Like title above, Using a custom HTTP 404 page(404.html or 404.php) is allowed to UBOS?

And if I am able to do so, which .htaccess needs to be used and where it should be located, assuming UBOS would make a response for it.

Thanks!



j12t
Posts: 171
Joined: Tue Dec 12, 2017 9:17 pm
Contact:

Re: Using a custom 404 page

Post by j12t »

I would be interested in understanding what the problem is you would like to solve?

Whether you can do something with .htaccess highly depends on the particular app(s) you are running. Some of them have their own, for example. I don't recommend it.

However, if you like, you can edit either:
* /etc/httpd/conf/errors.conf, or
* /srv/http/_errors/404.html

These set the default for all sites on the device. Making any changes there likely requires you to restart Apache, and may be overwritten with the next UBOS update. (Which is why I'm asking about the problem you are trying to solve.)

criky
Posts: 76
Joined: Fri Jul 05, 2019 4:24 am

Re: Using a custom 404 page

Post by criky »

I would be interested in understanding what the problem is you would like to solve?
I don't have any problems to HTTP status page.
Sometimes it used to say a bit different to what I'm wanting to say about the current state of my site, though.

So I want to know whether my HTTP error page can be customized just like the websites which have their own 404 page.(e.g. https://en.wikipedia.org/wiki/HTTP_404# ... or_404.png)
Whether you can do something with .htaccess highly depends on the particular app(s) you are running. Some of them have their own, for example. I don't recommend it.
In general, you are right and that is exactly what I know from the hosting services I use, where I can access the .htaccess file on the root directory and allowed to make any change on it.
This is my first time ever hosting my site on my server, so I doubt if it can be applied as well.

If it would affect the entire system, and probably mess up, then I would rather not change anything, like you saying.

Thanks.

Post Reply