You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jayaram Ponnusamy <ja...@gmail.com> on 2016/10/04 11:54:45 UTC

[users@httpd] Any Modules required for ErrorDocument?

Hi,

I am new to Apache WebServer

I tried lot with httpd.conf & virtualhost.conf but nothing is working for
me.
Kindly please help me on this. Still we are not able to redirect users to
custom Error page by using ErrorDocument. Kindly please let me know if any
other options we have?


written the Rules like below but it didnt work.

Redirect 404 /sites/en_US/404
ErrorDocument 404 /sites/en_US/404

If use like below then all pages taking to custom Error page. Kindly please
help me to resolve this issue.
Redirect 404 /
ErrorDocument 404 "<h1>Custom 404 Page</h1>"



<VirtualHost *:80> ServerName cmspliv1.com ErrorLog
logs/live/http_error.log RewriteLog logs/live/http_rewrite.log CustomLog
"|/opt/apps/apache/bin/rotatelogs -f
/opt/apps/apache/logs/live/http_access.log.%Y.%m.%d
86400 +60" imi Redirect 404 /sites/en_US/404 ErrorDocument 404
/sites/en_US/404
RewriteEngine on
#RedirectMatch 404 /sites/en_US/404


JkMount   /*        prod_live_svr
JkOptions +ForwardURICompatUnparsed
</VirtualHost>
-- 

*Thanks & Regards,*

*Jayaram*

Re: [users@httpd] Any Modules required for ErrorDocument?

Posted by Daniel <df...@gmail.com>.
My fault, I didn't notice the first time I read your message, that you were
using "JkMount   /*"

AFAIK that proxies "everything" to the tomcat backend, so it is in the
tomcat where you should set your error pages, or configure your tomcat
module to make an exception for the paths you are going to use in Apache
HTTPD.

2016-10-05 7:01 GMT+02:00 Jayaram Ponnusamy <ja...@gmail.com>:

> Hi Petr & Daniel,
>
> Initially I tried with ErrorDocument but it didn't help. So, I tried
> Redirect.
> We are using Java based CMS application. (Apache HTTP WebServer -> Tomcat
> Server -> CMS System-> DataBase). and VirualHost to connect Application
> Server (WeB & App on different Servers)
>
> I followed documents but something went wrong and I tried this
> ErrorDocument in httpd.conf didnt work, then I tried with virtualHost.conf,
> this also not working.
>
> On Tue, Oct 4, 2016 at 5:26 PM, Daniel <df...@gmail.com> wrote:
>
>> Hello,
>>
>> Redirect takes at least 2 arguments, a request and a destination. This
>> directive depends on mod_alias module.
>>
>> Eg: Redirect /something /otherthing
>> This will redirect if someone requests /something /somethingblablabla to
>> /otherthing or /otherthingblablabla
>>
>>
>> ErrorDocument is a core directive (no extra modules needed) and takes 2
>> arguments and is used this way:
>> Eg: ErrorDocument 404 /path/to/404errorpage.html
>> This path is relative to DocumentRoot.
>>
>> For further reference please use the official docs:
>> http://httpd.apache.org/docs/2.4/mod/core.html#errordocument
>>
>> 2016-10-04 14:18 GMT+02:00 Petr Gajdos <pg...@suse.cz>:
>>
>>> Hello,
>>>
>>> On Tue, Oct 04, 2016 at 02:54:45PM +0300, Jayaram Ponnusamy wrote:
>>> > Redirect 404 /sites/en_US/404
>>> > ErrorDocument 404 /sites/en_US/404
>>>
>>> not sure what you want to achieve with Redirect directive, but an
>>> example how to use ErrorDocument directive is here:
>>>
>>> https://github.com/pgajdos/apache-rex/tree/master/core-Error
>>> Document-basic
>>>
>>> Petr
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>> For additional commands, e-mail: users-help@httpd.apache.org
>>>
>>>
>>
>>
>> --
>> *Daniel Ferradal*
>> IT Specialist
>>
>> email         dferradal at gmail.com
>> linkedin     es.linkedin.com/in/danielferradal
>>
>
>
>
> --
>
> *Thanks & Regards,*
> *Jayaram Ponnusamy*
>



-- 
*Daniel Ferradal*
IT Specialist

email         dferradal at gmail.com
linkedin     es.linkedin.com/in/danielferradal

Re: [users@httpd] Any Modules required for ErrorDocument?

Posted by Jayaram Ponnusamy <ja...@gmail.com>.
Hi Petr & Daniel,

Initially I tried with ErrorDocument but it didn't help. So, I tried
Redirect.
We are using Java based CMS application. (Apache HTTP WebServer -> Tomcat
Server -> CMS System-> DataBase). and VirualHost to connect Application
Server (WeB & App on different Servers)

I followed documents but something went wrong and I tried this
ErrorDocument in httpd.conf didnt work, then I tried with virtualHost.conf,
this also not working.

On Tue, Oct 4, 2016 at 5:26 PM, Daniel <df...@gmail.com> wrote:

> Hello,
>
> Redirect takes at least 2 arguments, a request and a destination. This
> directive depends on mod_alias module.
>
> Eg: Redirect /something /otherthing
> This will redirect if someone requests /something /somethingblablabla to
> /otherthing or /otherthingblablabla
>
>
> ErrorDocument is a core directive (no extra modules needed) and takes 2
> arguments and is used this way:
> Eg: ErrorDocument 404 /path/to/404errorpage.html
> This path is relative to DocumentRoot.
>
> For further reference please use the official docs:
> http://httpd.apache.org/docs/2.4/mod/core.html#errordocument
>
> 2016-10-04 14:18 GMT+02:00 Petr Gajdos <pg...@suse.cz>:
>
>> Hello,
>>
>> On Tue, Oct 04, 2016 at 02:54:45PM +0300, Jayaram Ponnusamy wrote:
>> > Redirect 404 /sites/en_US/404
>> > ErrorDocument 404 /sites/en_US/404
>>
>> not sure what you want to achieve with Redirect directive, but an
>> example how to use ErrorDocument directive is here:
>>
>> https://github.com/pgajdos/apache-rex/tree/master/core-Error
>> Document-basic
>>
>> Petr
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>
>
> --
> *Daniel Ferradal*
> IT Specialist
>
> email         dferradal at gmail.com
> linkedin     es.linkedin.com/in/danielferradal
>



-- 

*Thanks & Regards,*
*Jayaram Ponnusamy*

Re: [users@httpd] Any Modules required for ErrorDocument?

Posted by Daniel <df...@gmail.com>.
Hello,

Redirect takes at least 2 arguments, a request and a destination. This
directive depends on mod_alias module.

Eg: Redirect /something /otherthing
This will redirect if someone requests /something /somethingblablabla to
/otherthing or /otherthingblablabla


ErrorDocument is a core directive (no extra modules needed) and takes 2
arguments and is used this way:
Eg: ErrorDocument 404 /path/to/404errorpage.html
This path is relative to DocumentRoot.

For further reference please use the official docs:
http://httpd.apache.org/docs/2.4/mod/core.html#errordocument

2016-10-04 14:18 GMT+02:00 Petr Gajdos <pg...@suse.cz>:

> Hello,
>
> On Tue, Oct 04, 2016 at 02:54:45PM +0300, Jayaram Ponnusamy wrote:
> > Redirect 404 /sites/en_US/404
> > ErrorDocument 404 /sites/en_US/404
>
> not sure what you want to achieve with Redirect directive, but an
> example how to use ErrorDocument directive is here:
>
> https://github.com/pgajdos/apache-rex/tree/master/core-ErrorDocument-basic
>
> Petr
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


-- 
*Daniel Ferradal*
IT Specialist

email         dferradal at gmail.com
linkedin     es.linkedin.com/in/danielferradal

Re: [users@httpd] Any Modules required for ErrorDocument?

Posted by Petr Gajdos <pg...@suse.cz>.
Hello,

On Tue, Oct 04, 2016 at 02:54:45PM +0300, Jayaram Ponnusamy wrote:
> Redirect 404 /sites/en_US/404
> ErrorDocument 404 /sites/en_US/404

not sure what you want to achieve with Redirect directive, but an
example how to use ErrorDocument directive is here:

https://github.com/pgajdos/apache-rex/tree/master/core-ErrorDocument-basic

Petr


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org