where is my 404 error page forwards link and where is forbidden 404 page in centos apache

Dear Experts,

I have two questions  for my apache Centos6 VPS server with root access, please advise
Question-1
I try to setup my own error.html for 404. But when include or NOT-include  "ErrorDocument 404 /error.html" in my .htaccess file, whatever both methods will  also go to error.html page when try to go to my testing site at http://mysite.com/store/no-this-file.html  on browser(which is not existing on the store directory that just for  testing). So somehow, I let it worked before or long time ago.
I can NOT remember where or when  I made the error.html page forward work, Besides error page forwards is enabled(ErrorDocument 404 /error.html) in .htacess file, where else apache server can make it  possible.I check /usr/local/apache/htdocs/, there is no any .htaccess

When I  go to check the httpd.conf file at /etc/httpd/conf/, there is NO any about error document handle stuff

.htaccess file
==============================
ErrorDocument 404 /error.html
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>

Question-2
If I try to go to directory such as http://mysite/store on browser , it will show out
404 forbidden page, I want to know where is the forbidden page is located on my
apache Centos VPS server, I try to find it at /usr/local/apache, nothing find.
Where is the fobidden page located  ? because I want to do some css on it.

Fobidden page:
--------------------------
Forbidden

You don't have permission to access /store on this server.

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

Apache/2.2.23 (Unix) mod_ssl/2.2.23 OpenSSL/1.0.0-fips mod_bwlimited/1.4 PHP/5.3.21 Server at 212.1.209.242 Port 80
LVL 1
rwniceingAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
'ErrorDocument 404 /error.html' should be only in .htaccess in the root of your web directories.

As for the 'Forbidden' message, that is not a page, it is text that is built-in to Apache.  If you want a page that you can 'style', then add other ErrorDocument pages like this:
ErrorDocument 400 /400.html
ErrorDocument 401 /401.html
ErrorDocument 403 /403.html
ErrorDocument 404 /error.html
ErrorDocument 500 /500.html

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rwniceingAuthor Commented:
I know when I change .htaccess file  at my public_html directory, I don't need to
restart httpd to make  the new update on .htaccess is  effective right way.
When delete "ErrorDocument 404 /error.html" in my .htaccess file,it also work, why ? Whatever I detele or add the "Error...." or restart httpd or not, it also work , Why ? So I guess somewhere apache did it  for me that I might did it a long time ago if .htacess did NOT do it.

Do you understand my question-1 ?

Please advise
0
Dave BaldwinFixer of ProblemsCommented:
No, I don't understand your question.  Apache does not need the "ErrorDocument 404 /error.html" to put up an error message.  "ErrorDocument 404 /error.html" gives you the opportunity to show a custom error message of your own in a page called "error.html" in your root directory.

Also, Apache will read the .htaccess file (if it is there) every time a request is made for a page in that web site.  No restart is needed when you change the .htaccess file.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

rwniceingAuthor Commented:
I tried to detele it or NOT-inciude it  such as

#ErrorDocument 404 /error.html
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>

it still works to get the error.html on my browser, why  ?
0
rwniceingAuthor Commented:
Now doing another test,  I copy error.html to error2.html
and enable it for error2.html as following new .htaccess file

.htaccess file
======================
ErrorDocument 404 /error2.html
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>

the code ErrorDucument is also working for error2.html that is normal case and supppsed to be working. When I delete  or not-include it, it will go to error.html again.
0
Dave BaldwinFixer of ProblemsCommented:
All I can think of is that you have another copy of "ErrorDocument 404 /error.html" some where in the path or a 'conf' file.
0
rwniceingAuthor Commented:
Include "/usr/local/apache/conf/includes/errordocument.conf" that is
shown in httpd.conf. But nothing I can find about error.html

404.shtml is going to locate other page that is not error.html
errordocument.conf file
===================================
# 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


Now I think I need to find a string in a file for all directory to seach error.html string by the
following linux command with root access

grep -R "error.html" *
0
rwniceingAuthor Commented:
nothing find from grep -R "error.html"  besides those are not related

Is there any method to solve this  such as checking apache reaction to call error.html page  in
event log files so that I can see where apache module or php script to call error.html ?
0
Dave BaldwinFixer of ProblemsCommented:
I don't what else to tell you.  You can click on "Request Attention" above to get others to look at your question.
0
rwniceingAuthor Commented:
Thanks for all of your, this thread is partially solved.
it will continue on next new thread with re-write question-1 and add more detail.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.