logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

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.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: To display the custom 404 Error page
Author
pachaiyappan



Joined: 14 Jun 2013
Posts: 25
Location: India,chennai

PostPosted: Fri 14 Jun '13 13:15    Post subject: To display the custom 404 Error page Reply with quote

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 Shocked
Back to top
pachaiyappan



Joined: 14 Jun 2013
Posts: 25
Location: India,chennai

PostPosted: Fri 14 Jun '13 15:01    Post subject: To display the custom 404 Error page Reply with quote

This is the httpd.conf file I am using .





Admin note: moved config to http://pastebin.com/raw.php?i=0YhFqPYz
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Sun 16 Jun '13 9:55    Post subject: Reply with quote

Per docs, ErrorDocument requires AllowOverride Fileinfo for the Directory
Back to top
pachaiyappan



Joined: 14 Jun 2013
Posts: 25
Location: India,chennai

PostPosted: Mon 17 Jun '13 8:56    Post subject: Reply with quote

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

PostPosted: Mon 17 Jun '13 11:01    Post subject: Reply with quote

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


Reply to topic   Topic: To display the custom 404 Error page View previous topic :: View next topic
Post new topic   Forum Index -> Apache