# ErrorDocument troubles with Apache 2



## ListerMint (Aug 28, 2003)

I cannot get my server to recognize my Error Documents. I am using Apache 2.0.44 on an eMac. I have something configured wrong in the httpd.conf. but I can't figure what it is. 

The error I get is:
The requested URL /1.html was not found on this server.

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

Could someone walk me through the process in "laymen's terms"?

Thanks,
ListerMint


----------



## ListerMint (Sep 19, 2003)

Still needing an answer. Anyone?


----------



## uoba (Sep 19, 2003)

Have you checked the path to your personalised 404 Error html file (the 1.html)? It just seems to me that it can't find it.


----------



## ListerMint (Sep 20, 2003)

Hey uoba,
Checked path name. Files are all located in the root directory in a folder called errordocs. The httpd.conf has path of /errordocs/blah.html. That's a match isn't it?  
ListerMint


----------



## uoba (Sep 20, 2003)

Try different ways then, try an absolute link to the ErrorDocument (i.e. http://www.mysite.com/errorDocs/error404.html)

I gather you've uncommented the line:

```
#ErrorDocument 404 /missing.html
```

(removed the # and added your own relative/absolute link to the file)


----------



## ListerMint (Sep 20, 2003)

hey uoba,

I changed the pathname to the absolute as you suggested, but I recently upgraded my server and now it won't start up.   

I will have to wait until I figure why it won't start before I can check on the ErrorDocs.

Thanks for your help.


----------



## uoba (Sep 20, 2003)

Which server software? Regular OS X, OS X Server, or a Linux box?


----------



## ListerMint (Sep 21, 2003)

I have an eMac with OS X 10.2.6.

I just upgraded Apache 2.0.44 to 2.0.47, but it won't start up. I went to the terminal and got the following message:

shell> /Library/Apache2/bin/apachectl configtest
Syntax error on line 1119 of /Library/Apache2/conf/httpd.conf:
Cannot load /Library/Apache2/modules/libphp4.so into server: dyld: /Library/Apache2/bin/httpd can't open library: /Library/Apache2/lib/libaprutil.0.dylib  (No such file or directory, errno = 2)

The file libaprutil.0.dylib is a shortcut that points to libaprutil-0.0.9.4.dylib in the same directory.

I should also tell you this:
1) I upgraded from PHP 4.3.1 to 4.3.3 
Note: the phpinfo() reads it as php 4.3.1. Have not figured out why yet.

2) I then upgraded mySQL from 4.0.12 to 4.0.15. Works fine.

3) Changed LoadModule cgid_module modules/mod_cgid.so to LoadModule cgi_module modules/mod_cgi.so before installation as per instructions in Read Me.

4) Then, I upgraded the Apache


----------



## ListerMint (Sep 23, 2003)

Problem solved!

I had the wrong PHP package installed. Installed right one. Server started working. ErrorDocuments started working. I have no idea what the PHP and ErrorDocs had to do with each other, but they work. All's well.

Thank you for your help.

ListerMint


----------



## ListerMint (Sep 26, 2003)

I thought I had this fixed!?!?! 

I have custom ErrorDocuments created for my local server that are really strange. Whenever I type in a URL that doesn't exist I get the 404 page just like it is supposed to, no matter how deep in the directory I go. 

However, I have a website that for some reason is giving me a 403 error. The ErrorDocument I wrote for that doesn't work according to Apache. Apache says, 


> Forbidden
> 
> You don't have permission to access /webcode/xhtmlref/index.html on this server.
> 
> *Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.*



Now, if I move the xhtmlref folder to the root directory my 403 page works like it supposed to!?!?!

Question 1 - Why doesn't my 403 page work regardless of where the error occurs?

Question 2 - Why do I get a 403 error at all? I checked the permissions and they are legit. I have 6 other folders that do not give any errors. I can access them just fine.

 ListerMint


----------

