Keep Server Online
  
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
  
or
  
 
  
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
  
Thank You! Steffen
  
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
 |    |   
 | 
     Topic: To display  the custom 404 Error page | 
 |   
| Author | 
  | 
 
pachaiyappan
 
  
  Joined: 14 Jun 2013 Posts: 25 Location: India,chennai
  | 
 Posted: Fri 14 Jun '13 13:15    Post subject: To display  the custom 404 Error page | 
     | 
 
  | 
 
Hi,
 
we are integrating Latest Apache 2.4.4 in our secured (https)application .we want to throw our custom Error pages for E.g 404,500,403..etc. we have tried to throw 404 Error custom page  using 
 
ErrorDocument 404 /MyErrorPage.html  in httpd.conf File .
 
 But still we are getting default 404 Error page . For testing purpose we did check these scenarios, put this  MyErrorPage.html under htdocs or conf or cgi-bin directories . but we didn't get custom Error Page .
 
 
Could you please help me on this Configuration ASP    | 
 
  | 
 
| Back to top | 
 | 
 
pachaiyappan
 
  
  Joined: 14 Jun 2013 Posts: 25 Location: India,chennai
  | 
 | 
 
| Back to top | 
 | 
 
glsmith Moderator
  
  Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
  | 
 Posted: Sun 16 Jun '13 9:55    Post subject:  | 
     | 
 
  | 
 
| Per docs, ErrorDocument requires AllowOverride Fileinfo for the Directory | 
 
  | 
 
| Back to top | 
 | 
 
pachaiyappan
 
  
  Joined: 14 Jun 2013 Posts: 25 Location: India,chennai
  | 
 Posted: Mon 17 Jun '13 8:56    Post subject:  | 
     | 
 
  | 
 
Hi,
 
 
we have modified and tried  below ways but again we got Default 404 Error  Page . 
 
 
Followed three ways : 
 
 
<Directory />
 
    Options FollowSymLinks
 
    AllowOverride Fileinfo 
 
</Directory>
 
 
ErrorDocument 404 /missing.html
 
 
 
               (or)
 
 
<Directory />
 
    Options FollowSymLinks
 
    AllowOverride Fileinfo 
 
ErrorDocument 404 /missing.html	
 
</Directory> 
 
 
 
                  (or)
 
 
 
 
 
<Directory "E:/sample/htdocs">
 
Options FollowSymLinks MultiViews
 
AllowOverride Fileinfo
 
Order allow,deny
 
Allow from all
 
</Directory>
 
 
 
<Directory "E:/sample/cgi-bin">
 
AllowOverride Fileinfo
 
#Options ExecCGI
 
#AddHandler cgi-script .pl
 
#ScriptInterpreterSource Registry-Strict
 
</Directory>
 
 
 
<Directory />
 
    Options FollowSymLinks
 
    AllowOverride Fileinfo 
 
</Directory> 
 
 
ErrorDocument 404 /missing.html
 
 
 
please advise . | 
 
  | 
 
| Back to top | 
 | 
 
glsmith Moderator
  
  Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
  | 
 Posted: Mon 17 Jun '13 11:01    Post subject:  | 
     | 
 
  | 
 
Well, looking at originally posted httpd.conf, these directories on the E drive do not even exist. I do not even see any includes to other files but the proxy-html.conf. It would help seeing an accurate httpd.conf.
 
 
 
However, this should stay like this, never give anything to /
 
<Directory />
 
    Options None
 
    AllowOverride none
 
    Require all denied
 
</Directory>
 
 
Then any <Directory> container where you want it to be activated, just add FileInfo to the AllowOverride
 
 
<Directory "E:/sample/htdocs">
 
Options FollowSymLinks MultiViews
 
AllowOverride Fileinfo
 
Require all granted
 
</Directory> 
 
 
<Directory "E:/sample/cgi-bin">
 
AllowOverride Fileinfo
 
#Options ExecCGI
 
#AddHandler cgi-script .pl
 
#ScriptInterpreterSource Registry-Strict
 
Require all granted
 
</Directory> | 
 
  | 
 
| Back to top | 
 | 
 
 
 
 
 | 
 
 
 |  
 
 |  
  |   
 |