ErrorDocument being ingnored - Using Virtual Servers and Apache 2.x and Fedora core3

I am running Apache 2.x on Fedora Core 3
I have only 17 Virtual domains.
Apache seems to be ignorning the ErrorDocument line.
I created a 404.html file and it is in the virtual servers root.

Here is the virtual config in httpd.conf:
<VirtualHost 206.224.67.20:80>
SuexecUserGroup "#501" "#501"
ServerName everythingwine.net
ServerAlias www.everythingwine.net
DocumentRoot /home/everythingwine/public_html
ErrorLog /home/everythingwine/logs/error_log
CustomLog /home/everythingwine/logs/access_log combined
ScriptAlias /cgi-bin/ /home/everythingwine/cgi-bin/
ErrorDocument 404 /404.html
<Directory /home/everythingwine/public_html>
Options Indexes IncludesNOEXEC FollowSymLinks
allow from all
AllowOverride All
</Directory>
</VirtualHost>
LVL 3
jbrashear72Asked:
Who is Participating?
 
kryptic0329Commented:
This line: ErrorDocument 404 /404.html

Do not include the /, since then you are referring to the system's root directory, not the vhost root. Just put:

ErrorDocument 404 404.html

inside the vhost config and it should work like a charm. Make sure you restart the server for the config changes to take effect.
0
 
ramazanyichCommented:
ErrorDocument which appears under <VirtualHost> will be available only for that Virtual host. Other virtaul hosts will have standard 404 error output.
Put ErrorDocument outside the VirtualHost.
0
 
jbrashear72Author Commented:
Thank you both but That is not the issue.
I need for each virtual site to have it's own custom 404 page.
Apache server is totally ignoring it and when you get a 404 a ie error page comes up, meaning no 404 page showing.
Maybe this will help.
-J
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
ramazanyichCommented:
There is known issue with IE explorer.
"Microsoft Internet Explorer (MSIE) will by default ignore server-generated error messages when they are "too small" and substitute its own "friendly" error messages. The size threshold varies depending on the type of error, but in general, if you make your error document greater than 512 bytes, then MSIE will show the server-generated error rather than masking it. More information is available in Microsoft Knowledgebase article Q294807."

How big is your 404 file
0
 
jbrashear72Author Commented:
OK No that is totally not wahat I was saying...... No default 404 error page is coming up. Most web pages are around 33k in size.
That is not the issue.
The 404 page uses the same page layout as the site.
This issue:

virtuall hosts have a ErrorDocument  loaded
Apache is not recognizing that that dirrective in in there.
I think that apache is misconfigured some place else in the httpd.conf file

So I guess is there another place I need to comment out a line or ad a line in apache?
I have tried the default server ErrorDocument both commented out and not same issue both times.
0
 
ramazanyichCommented:
did you check ErrorLog file ? maybe there you will have some detailed info about your problem?
Could it be that permisiion to file is wrong ?
0
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.

All Courses

From novice to tech pro — start learning today.