.htaccess problem: numerical ips work, names do not

.htaccess problem: numerical ips work, names do not

Post by Torsten Sande » Fri, 12 Jul 2002 16:55:02



Hello,

since we've switched from our old Apache 1.3 on AIX to a brand new
Apache 2.0.39 on ppc64-Linux, we have run into the following problem:

Placing something like:

deny from all
allow from math.tu-clausthal.de

in the .htaccess file of a directory results in an access forbidden
error when accessing files in that directory (from the above domain).

However, placing the corresponding numerical ip

deny from all
allow from 139.174.105

in the .htaccess file makes it work.

What am I missing here?

To my knowlegde, Apache does not provides options that affect the name
lookup procedure in .htaccess files. Therefore the httpd.conf must be
correctly set up. If it is a problem with the system environment (SuSE
7.3 PPC Linux on an IBM RS/6000 260, selfmade Apache 2.0.39) I wonder
what it can be. Of course, dns works fine on that machine, I've checked
that much.

Thanks,

Torsten.

 
 
 

.htaccess problem: numerical ips work, names do not

Post by 2Host.co » Fri, 12 Jul 2002 17:11:14



> Hello,

> since we've switched from our old Apache 1.3 on AIX to a brand new
> Apache 2.0.39 on ppc64-Linux, we have run into the following problem:

> Placing something like:

> deny from all
> allow from math.tu-clausthal.de

> in the .htaccess file of a directory results in an access forbidden
> error when accessing files in that directory (from the above domain).

> However, placing the corresponding numerical ip

> deny from all
> allow from 139.174.105

> in the .htaccess file makes it work.

> What am I missing here?

> To my knowlegde, Apache does not provides options that affect the name
> lookup procedure in .htaccess files. Therefore the httpd.conf must be
> correctly set up. If it is a problem with the system environment (SuSE
> 7.3 PPC Linux on an IBM RS/6000 260, selfmade Apache 2.0.39) I wonder
> what it can be. Of course, dns works fine on that machine, I've checked
> that much.

> Thanks,

> Torsten.

Do you have HostNameLookups enabled in the Apache configuration?

Regards,
Robert
--

Server administrator/support - 2Host.com web hosting.
Secure, reliable hosting - What you expect & deserve!
How are we different? Find out: http://www.2host.com/

 
 
 

.htaccess problem: numerical ips work, names do not

Post by Torsten Sande » Fri, 12 Jul 2002 19:20:07



> Do you have HostNameLookups enabled in the Apache configuration?

Yes, I have. But to my knowledge this option only affects the way hosts
are logged.

Bye,

Torsten.

 
 
 

.htaccess problem: numerical ips work, names do not

Post by Joshua Sliv » Sat, 13 Jul 2002 03:36:06




>> Do you have HostNameLookups enabled in the Apache configuration?
> Yes, I have. But to my knowledge this option only affects the way hosts
> are logged.

Correct.  HostNameLookups shouldn't matter.

The most likely cause of your problem is some dns problems on your server.
Try taking the IP address from the access log and performing reverse and
forward DNS lookups on it at the server and make sure everything
looks right.

--
Joshua Slive

Apache HTTP Server Users Mailing List: http://httpd.apache.org/userslist.html

 
 
 

.htaccess problem: numerical ips work, names do not

Post by 2Host.co » Sat, 13 Jul 2002 08:41:28




> > Do you have HostNameLookups enabled in the Apache configuration?

> Yes, I have. But to my knowledge this option only affects the way hosts
> are logged.

> Bye,

> Torsten.

Apache will not resolve hostnames without it enabled. It's not just for
logging.

Regards,
Robert
--

Server administrator/support - 2Host.com web hosting.
Secure, reliable hosting - What you expect & deserve!
How are we different? Find out: http://www.2host.com/

 
 
 

1. .htaccess, domain name access works with numbers, not names

        I can't get .htaccess to allow access to only our local
domain using the domain name in the .htaccess file, although it works
if I use the dotted quad (well, triplet, really).  I have a theory as
to why this might be, and want to run it out and see if anyone has
solved it.

        This works:

<Limit GET>
order deny, allow
deny from all
allow from 13.246.76
</Limit>

        This does not work:

<Limit GET>
order deny, allow
deny from all
allow from .xis.xerox.com
</Limit>

        (Of course, 13.246.76.* is part of xis.xerox.com).

        If I look in the error_log, I note that it says:

access for /gotest failed for beowulf, reason : Client denied by
server configuration

        where beowulf is beowulf.xis.xerox.com.

        So, it seems to me the problem is that local addresses are not
looked up as FQDN, therefore they don't match the domain, therefore
they fail.  If IP address is used, there is no need to go to the
resolver to get domain name, therefore it works.

        My theory:  SunOS (on which I'm running the server) hooks all
lookups through their YP/NIS service.  If it can resolve it based on
YP, it will, and it will probably not be fully qualified.  If YP
doesn't have the info, it will roll over to the DNS resolver, which
will return a FQDN.  Therefore, allowing the local domain by name will
always fail because local domin host names are returned without domain
qualification.

        My question:  I've seen other people report similar problems.
Are folks with this problem running SunOS?  Is there another, simpler
solution known out there that my searching has missed?

        I intend to look at the lookup source later and see if I can
write a test program  to figure it out.  But, in the meantime, if
anyone can shed light on this, agree or disagree, I would appreciate
it.


 1.01 GCS/GO d++ p+ c++ l++ u++ e+ -m+ s++/- n- h !(f)? g+ -w+ t+ r-- y?
 "I want to permeate the air you breathe/slide my way under your skin/place
myself behind your eyes/and watch you, watch me, looking in." Katell Keineg

2. Physical != logical for Harddisk, complains fdisk

3. RH 6.0: Stumped by network: works on L4 IPs, but not L3 IPs

4. interface metric

5. htaccess problems with host names, but not IP numbers

6. imagetool

7. Apache .htaccess problem (dbmmanage not working)

8. unique identifier for binary compatibility similar to uname

9. .htaccess restriction by subnet, not domain name

10. "user not found" doing .htaccess authentication

11. 4.2 nic aliasing, multiple IPs, one nic does not work???

12. Masquerading not working for some IPs

13. Multiple IPs Not Working...