OpenWrt Forum Archive

Topic: custom 404 error pages

The content of this topic has been archived on 28 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi All

I need to change the default error pages in my OpenWRT httpd.
How can I do that?

Thanks,
Gili

From the httpd source-

 * httpd.conf has the following format:
 *
 * A:172.20.         # Allow address from 172.20.0.0/16
 * A:10.0.0.0/25     # Allow any address from 10.0.0.0-10.0.0.127
 * A:10.0.0.0/255.255.255.128  # Allow any address that previous set
 * A:127.0.0.1       # Allow local loopback connections
 * D:*               # Deny from other IP connections
 * E404:/path/e404.html # /path/e404.html is the 404 (not found) error page

I'm not sure if you can pass this option via the command line (or /etc/config/httpd), but hopefully this helps.

Cheers,
Charlie

(Last edited by ciscostu on 30 Apr 2009, 17:37)

Thanks!!!
It worked, I add my http.conf whit all the errors I need to replace.
I started my httpd whit "-c /path/to/the/httpd.conf" flag.

Gili

Add a new section to /etc/config/httpd. Specify your custom httpd.conf there and you will have two instanes of Busybox httpd running.

The discussion might have continued from here.