You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Leonard den Ottolander <le...@den.ottolander.nl> on 2010/12/18 14:40:36 UTC

[users@httpd] IP restricted site showing noindex.html not 403

Hello,

I've set up a test site to which I restricted access by setting "Allow
from" to a single IP address in the web root Directory entry. However,
when I access the site from another IP by just providing the domain name
(http://example.com) I get the noindex.html page instead of the expected
403 document. Providing an url with a file name
((http://example.com/anyfile)) shows the 403 document as I expected.

Is it expected behaviour that apache shows the noindex file instead of a
403 document in this case? This is a CentOS 4 system
(httpd-2.0.52-41.ent.7.centos4) so it could well be this is an issue
that has been fixed in later releases.

I tried using a
RewriteRule ^/$ http://%{HTTP_HOST}/index.php [L,R]
to work around this issue. This works fine as long as the site is empty,
but since the application I'm testing rewrites index.php to / it creates
and endless redirect.

Is there any way I can configure apache to show the 403 document when
the plain domain name is used as the url? If this is a known issue fixed
in later releases it suffices for me to know that is the case. Thanks
for your help.

Regards,
Leonard.

-- 
mount -t life -o ro /dev/dna /genetic/research



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] IP restricted site showing noindex.html not 403

Posted by Leonard den Ottolander <le...@den.ottolander.nl>.
Hello Eric,

On Sat, 2010-12-18 at 18:03 +0100, Leonard den Ottolander wrote:
> On Sat, 2010-12-18 at 08:49 -0500, Eric Covener wrote:
> > Assuming your "noindex" page is a custom 403 ErrorDocument just for /,
> > then this is working correctly.  You've overridden the error response
> > with something very specific for this URL.
> 
> No, it's not.

It always helps to grep. It actually turns out this is indeed a 403
document defined as a <LocationMatch "^/+$"> in welcome.conf which is
provided by the RHEL/CentOS rpm. I suppose overriding that LocationMatch
in my vhost configuration should fix my issue. Thank you.

Regards,
Leonard.

-- 
mount -t life -o ro /dev/dna /genetic/research



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] IP restricted site showing noindex.html not 403

Posted by Leonard den Ottolander <le...@den.ottolander.nl>.
Hello Eric,

On Sat, 2010-12-18 at 08:49 -0500, Eric Covener wrote:
> Assuming your "noindex" page is a custom 403 ErrorDocument just for /,
> then this is working correctly.  You've overridden the error response
> with something very specific for this URL.

No, it's not. It's what I presume is the default fall back located
in /var/www/error for when no index page is available. So when I specify
specify http://example.com I will see this noindex.html - whether or not
the web root contains an index file doesn't make a difference - but when
I specify http://example.com/anyfile I see a 403 document, irregardless
of whether "anyfile" exists or not.

Regards,
Leonard.

-- 
mount -t life -o ro /dev/dna /genetic/research



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] IP restricted site showing noindex.html not 403

Posted by Eric Covener <co...@gmail.com>.
> Is it expected behaviour that apache shows the noindex file instead of a
> 403 document in this case? This is a CentOS 4 system
> (httpd-2.0.52-41.ent.7.centos4) so it could well be this is an issue
> that has been fixed in later releases.

Assuming your "noindex" page is a custom 403 ErrorDocument just for /,
then this is working correctly.  You've overridden the error response
with something very specific for this URL.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org