On Fri, 6 Nov 2026 15:55:21 +0100
"Daniel via users" <[email protected]> wrote:

> On 11/1/26 21:36, Adrian via users wrote:
> > I've moved a web server to a new PVS.  The old install had a custom
> > 404 page
> > /usr/share/apache2/error/HTTP_NOT_FOUND.html
> >
> > and the config (in various places) pointed to it.
> > ErrorDocument 404 /usr/share/apache2/error/HTTP_NOT_FOUND.html
> >
> > When I first moved, I hadn't created the custom page, but copied it
> > across later.
> >
> > All the relevant config and file locations are the same as on the
> > old server.  But the 404 page displayed is a default "not found on
> > this server" one.
> >
> > To check if the html.var is being used, I changed the text there.  I
> > believe a restart is not needed, but did one anyway.  The 404 page
> > still has the default text.
> >
> > In case it was cached by my browser I tried from a different machine
> > with the same result.
> >
> > The old server's Apache version was 2.4.59 and the new one 2.4.68.
> > I'm running 2.4.68 on another server with a custom 404 page, and
> > that is being displayed.
> >
> > How can I tell where it is looking for the text, and how can I
> > change it to where it used to get it, or to somewhere where it can
> > get it now?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]  
> 
> Hello,
> 
> As per ErrorDocument doc
> "https://httpd.apache.org/docs/2.4/mod/core.html#errordocument":
> "URLs can begin with a slash (/) for local web-paths (relative to the
> |DocumentRoot
> <https://httpd.apache.org/docs/2.4/mod/core.html#documentroot>|)". It
> seems you are trying to link an ErrorDocument to a full path in your
> OS.
> 
> Perhaps it is more correct to specify it with something like this in
> the virtualhost you are trying to use, or in server config:
> 
> ErrorDocument 404 /error/HTTP_NOT_FOUND.html
> Alias /error/ /usr/share/apache2/error/
> <Directory /usr/share/apache2/error>
>      Options none
>      Require all granted
> </Directory>
> 
> Cheers
> 

Thanks Daniel,

I tried with and without the /error/ alias, but maybe I don't have the
Directory entry.

I'm away for a few days but will try after that and report back.

Adrian

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to