You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Christophe JAILLET <ch...@wanadoo.fr> on 2020/04/15 19:52:43 UTC
[users@httpd] Re: Custom Error Pages
Le 15/04/2020 à 08:24, Praveen Kumar K S a écrit :
> Hello,
>
> I'm looking for some help in configuring custom error pages in httpd
> 2.4.39
>
> I'm compiling httpd and running it as a container. If someone can help
> me with the manuals or documentation, it will be helpful.
>
> Regards,
> Praveen Kumar K S
> +91-9986855625
Hi,
have you already looked at [1]?
CJ
[1]: https://httpd.apache.org/docs/2.4/en/mod/core.html#errordocument
Re: [users@httpd] Re: Custom Error Pages
Posted by Andrei <la...@gmail.com>.
Horrible idea. Total overkill running all those echos and such for a mere
404... Bots will bend your server during spikes. Use shtml. Call it a day.
On Sat, Apr 18, 2020, 18:27 Antony Stone <An...@apache.open.source.it>
wrote:
> On Saturday 18 April 2020 at 17:05:22, Praveen Kumar K S wrote:
>
> > Hello,
> >
> > Any help would be appreciated. If any of you had done this before or
> > published on blogs or somewhere, please suggest your inputs.
>
> Well, first of all, does your web server successfully serve CGI scripts
> when
> they are found at a standard URL, rather than being an ErrorDocument
> reference?
>
> Antony.
>
> > On Thu, 16 Apr, 2020, 14:29 Praveen Kumar K S wrote:
> > > Hello,
> > >
> > > Thanks for your response. I had gone through errordocument.
> > >
> > > I would like to rephrase my question. I'm looking for help on how to
> > > dynamically handle error pages. I wrote a small cgi script.
> > >
> > > Below is error config.
> > > ErrorDocument 404 "/cgi-bin/customerror.cgi"
> > >
> > > But httpd is printing the content of /cgi-bin/customerror.cgi incase of
> > > 404 and not executing it.
>
> --
> I conclude that there are two ways of constructing a software design: One
> way
> is to make it so simple that there are _obviously_ no deficiencies, and
> the
> other way is to make it so complicated that there are no _obvious_
> deficiencies.
>
> - C A R Hoare
>
> Please reply to the
> list;
> please *don't* CC
> me.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
Re: [users@httpd] Re: Custom Error Pages
Posted by Antony Stone <An...@apache.open.source.it>.
On Saturday 18 April 2020 at 17:05:22, Praveen Kumar K S wrote:
> Hello,
>
> Any help would be appreciated. If any of you had done this before or
> published on blogs or somewhere, please suggest your inputs.
Well, first of all, does your web server successfully serve CGI scripts when
they are found at a standard URL, rather than being an ErrorDocument
reference?
Antony.
> On Thu, 16 Apr, 2020, 14:29 Praveen Kumar K S wrote:
> > Hello,
> >
> > Thanks for your response. I had gone through errordocument.
> >
> > I would like to rephrase my question. I'm looking for help on how to
> > dynamically handle error pages. I wrote a small cgi script.
> >
> > Below is error config.
> > ErrorDocument 404 "/cgi-bin/customerror.cgi"
> >
> > But httpd is printing the content of /cgi-bin/customerror.cgi incase of
> > 404 and not executing it.
--
I conclude that there are two ways of constructing a software design: One way
is to make it so simple that there are _obviously_ no deficiencies, and the
other way is to make it so complicated that there are no _obvious_
deficiencies.
- C A R Hoare
Please reply to the list;
please *don't* CC me.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
[users@httpd] Re: Custom Error Pages
Posted by Praveen Kumar K S <pr...@securelyshare.com>.
Hello,
Any help would be appreciated. If any of you had done this before or
published on blogs or somewhere, please suggest your inputs.
Regards,
Praveen
On Thu, 16 Apr, 2020, 14:29 Praveen Kumar K S, <pr...@securelyshare.com>
wrote:
> Hello,
>
> Thanks for your response. I had gone through errordocument.
>
> I would like to rephrase my question. I'm looking for help on how to
> dynamically handle error pages. I wrote a small cgi script.
>
> Below is error config.
> ErrorDocument 404 "/cgi-bin/customerror.cgi"
>
> But httpd is printing the content of /cgi-bin/customerror.cgi incase of
> 404 and not executing it.
>
> Below is customerror.cgi
> #!/bin/sh
> #
> # customerror.cgi
> echo ("Content-Type: text/html")
> echo ("Status: $REDIRECT_STATUS")
> echo ""
> echo ("<html><head><title>Error</title><head>")
> echo ("<body bgcolor=white>")
> echo ("<font size=5 color=blue font=Arial>Sorry...there has been an
> error.</font>")
> echo ("<he noshade size=2>")
> echo ("<blockquote>")
> echo ("The error was: <font color=red>$REDIRECT_ERROR_NOTES</font>")
> echo ("</blockquote>")
> echo ("<he noshade size=2>")
> echo ("</html>")
>
> Please let me know what could be wrong. In short, I'm looking to achieve
> https://github.com/adriaanvanrossum/blog.adriaan.io/blob/gh-pages/_posts/2018-12-22-one-nginx-error-page-to-rule-them-all.md
>
> Regards,
> PK
>
>
>
> On Thu, Apr 16, 2020 at 1:22 AM Christophe JAILLET <
> christophe.jaillet@wanadoo.fr> wrote:
>
>> Le 15/04/2020 à 08:24, Praveen Kumar K S a écrit :
>>
>> Hello,
>>
>> I'm looking for some help in configuring custom error pages in httpd
>> 2.4.39
>>
>> I'm compiling httpd and running it as a container. If someone can help me
>> with the manuals or documentation, it will be helpful.
>>
>> Regards,
>> Praveen Kumar K S
>> +91-9986855625
>>
>> Hi,
>>
>> have you already looked at [1]?
>>
>> CJ
>>
>> [1]: https://httpd.apache.org/docs/2.4/en/mod/core.html#errordocument
>>
>
[users@httpd] Re: Custom Error Pages
Posted by Praveen Kumar K S <pr...@securelyshare.com>.
Hello,
Thanks for your response. I had gone through errordocument.
I would like to rephrase my question. I'm looking for help on how to
dynamically handle error pages. I wrote a small cgi script.
Below is error config.
ErrorDocument 404 "/cgi-bin/customerror.cgi"
But httpd is printing the content of /cgi-bin/customerror.cgi incase of 404
and not executing it.
Below is customerror.cgi
#!/bin/sh
#
# customerror.cgi
echo ("Content-Type: text/html")
echo ("Status: $REDIRECT_STATUS")
echo ""
echo ("<html><head><title>Error</title><head>")
echo ("<body bgcolor=white>")
echo ("<font size=5 color=blue font=Arial>Sorry...there has been an
error.</font>")
echo ("<he noshade size=2>")
echo ("<blockquote>")
echo ("The error was: <font color=red>$REDIRECT_ERROR_NOTES</font>")
echo ("</blockquote>")
echo ("<he noshade size=2>")
echo ("</html>")
Please let me know what could be wrong. In short, I'm looking to achieve
https://github.com/adriaanvanrossum/blog.adriaan.io/blob/gh-pages/_posts/2018-12-22-one-nginx-error-page-to-rule-them-all.md
Regards,
PK
On Thu, Apr 16, 2020 at 1:22 AM Christophe JAILLET <
christophe.jaillet@wanadoo.fr> wrote:
> Le 15/04/2020 à 08:24, Praveen Kumar K S a écrit :
>
> Hello,
>
> I'm looking for some help in configuring custom error pages in httpd 2.4.39
>
> I'm compiling httpd and running it as a container. If someone can help me
> with the manuals or documentation, it will be helpful.
>
> Regards,
> Praveen Kumar K S
> +91-9986855625
>
> Hi,
>
> have you already looked at [1]?
>
> CJ
>
> [1]: https://httpd.apache.org/docs/2.4/en/mod/core.html#errordocument
>