Can not find error pages extensions in httpd.conf

tranthu1983

Member
Jan 17, 2010
5
0
51
Hi all
i want co make custom error page for all hosting account on my server but when i try go to httpd.conf to do it i can not find error pages extensions

please show me how to do it ?

my current default 404 error page is :

Code:
Not Found

The requested URL /32523 was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
pls help
thank you
 

tranthu1983

Member
Jan 17, 2010
5
0
51
Hi
i check in httpd.conf and see this

Include "/usr/local/apache/conf/includes/errordocument.conf"

and when go to errordocument.conf

it show

# 400 - Bad Request
ErrorDocument 400 /400.shtml

# 401 - Unauthorized
ErrorDocument 401 /401.shtml

# 402 - Payment Required
ErrorDocument 402 /402.shtml

# 403 - Forbidden
ErrorDocument 403 /403.shtml

# 404 - Not Found
ErrorDocument 404 /404.shtml

# 405 - Method Not Allowed
ErrorDocument 405 /405.shtml

# 406 - Not Acceptable
ErrorDocument 406 /406.shtml


i think that is where i have to config

with this ErrorDocument 404 /404.shtml

that mean file 404.shtml stored in includes forder ?
but i not see it in includes
i tried put one file 404.shtml and restart apache but it still not work

any ideas ?

thank you
 

ModServ

Well-Known Member
Oct 17, 2006
337
5
168
Egypt
cPanel Access Level
Root Administrator
Take a look here:
/usr/local/apache/htdocs
You will see the error pages and in their code you will see include of this file
cp_errordocument.shtml
Modify it using:
pico /usr/local/apache/htdocs/cp_errordocument.shtml

Hope that help
 

tranthu1983

Member
Jan 17, 2010
5
0
51
cp_errordocument.shtml

<body>
<div id="body-content">
<!-- start content-->

<!--
instead of REQUEST_URI, we could show absolute URL via:
http://HTTP_HOST/REQUEST_URI
but what if its https:// or other protocol?

SERVER_PORT_SECURE doesn't seem to be used
SERVER_PORT logic would break if they use alternate ports
-->

<h1><!--#echo var="title" --></h1>
<p><!--#echo var="msg" --></p>
<blockquote>
<!--#echo var="HTTP_HOST" --><!--#echo var="REQUEST_URI" --> (port <!--#echo var="SERVER_PORT" -->)
</blockquote>
<p>
Please forward this error screen to <!--#echo var="SERVER_NAME" -->'s
<a href="mailto:<!--#echo var="SERVER_ADMIN" -->?subject=Error message [<!--#echo var="REDIRECT_STATUS" -->] <!--#echo var="title" --> for <!--#echo var="HTTP_HOST" --><!--#echo var="REQUEST_URI" --> port <!--#echo var="SERVER_PORT" --> on <!--#echo var="DATE_LOCAL"-->">
WebMaster</a>.
</p>
<hr />
<!--#echo encoding="none" var="SERVER_SIGNATURE" -->

<!-- end content -->
</div>
</body>
what i have to modify ?
im new in this

thank you!