Re: [users@httpd] htaccess file and computer names

2013-02-21 Thread Krist van Besien
On Tue, Feb 19, 2013 at 7:49 PM, Marc Fromm  wrote:
> I am using some htaccess files to control access to a few web pages.
>
> The htaccess file works if I use the ip address of the computer to grant
> access, but not its name.

If you want apache to be able to grant access based on computer name
you must be sure that revers DNS lookups for those machines works.
>From the point of view of the apache webserver all requests come from
an ip address. If you use a hostname in an access directive apache
will perform a reverse lookup on that ip address, and compares the
name it gets with the directive.
So what you first need to check is if reverse dns works.

Be warned however that having apache check dns with every request will
incur a performance penalty. However if convenience is more important
than performance this can be something that one can live with...


Krist


-- 
krist.vanbes...@gmail.com
kr...@vanbesien.org
Bern, Switzerland

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] htaccess file and computer names

2013-02-19 Thread Mathijs Schmittmann
Op 19 feb. 2013 om 21:01 heeft "Walter H."  het 
volgende geschreven:

> Hello,
> 
> DNS names won't work here;
> because the connection is made by an IP host,
> for this a reverse DNS request would be neccessary;
> 
> the apache log files also also don't contain DNS names, just IP addresses;

Note: This is only true if HostnameLookups is set to off

> 
> I wouldn't do this, because this decreases performance;
> 
> Walter
> 
> On 19.02.2013 19:49, Marc Fromm wrote:
>> 
>> I am using some htaccess files to control access to a few web pages.
>> 
>> The htaccess file works if I use the ip address of the computer to grant 
>> access, but not its name.
>> 
>> Is there another setting to enable for  “Allow from 
>> computername.domain.name” to work like using the ip address “Allow from 
>> ###.###.###.###” ?
>> 
>>  
>> 
>> Order deny,allow
>> 
>> Deny from all
>> 
>> Allow from computername.domain.name //this does not grant access
>> 
>> Allow from ###.###.###.### //this grants access
>> 
>>  
>> 
>> The computers and the server are all on the same network
>> 
>>  
>> 
>> Thanks
>> 
>>  
>> 
>> Marc
>> 
> 


Re: [users@httpd] htaccess file and computer names

2013-02-19 Thread Walter H.

Hello,

DNS names won't work here;
because the connection is made by an IP host,
for this a reverse DNS request would be neccessary;

the apache log files also also don't contain DNS names, just IP addresses;

I wouldn't do this, because this decreases performance;

Walter

On 19.02.2013 19:49, Marc Fromm wrote:


I am using some htaccess files to control access to a few web pages.

The htaccess file works if I use the ip address of the computer to 
grant access, but not its name.


Is there another setting to enable for  "Allow from 
computername.domain.name" to work like using the ip address "Allow 
from ###.###.###.###" ?


Order deny,allow

Deny from all

Allow from computername.domain.name //this does not grant access

Allow from ###.###.###.### //this grants access

The computers and the server are all on the same network

Thanks

Marc





smime.p7s
Description: S/MIME Cryptographic Signature


Re: [users@httpd] htaccess file and computer names

2013-02-19 Thread Paul Norton
On 19 February 2013 18:49, Marc Fromm  wrote:

>  I am using some htaccess files to control access to a few web pages.
>
> The htaccess file works if I use the ip address of the computer to grant
> access, but not its name.
>
> Is there another setting to enable for  “Allow from
> computername.domain.name” to work like using the ip address “Allow from
> ###.###.###.###” ?
>
> ** **
>
> Order deny,allow
>
> Deny from all
>
> Allow from computername.domain.name //this does not grant access
>
> Allow from ###.###.###.### //this grants access
>
> ** **
>
> The computers and the server are all on the same network
>
> ** **
>
> Thanks
>
> ** **
>
> Marc
>

Hello
http://httpd.apache.org/docs/2.0/mod/core.html#location

 SetHandler server-status
Order Deny,Allow
Deny from all
Allow from .foo.com
 
Hope this helps. All the best Paul

-- 
"Perhaps today is a good day to die. Prepare for ramming speed" -*Commander
**Worf*


[users@httpd] htaccess file and computer names

2013-02-19 Thread Marc Fromm
I am using some htaccess files to control access to a few web pages.
The htaccess file works if I use the ip address of the computer to grant 
access, but not its name.
Is there another setting to enable for  "Allow from computername.domain.name" 
to work like using the ip address "Allow from ###.###.###.###" ?

Order deny,allow
Deny from all
Allow from computername.domain.name //this does not grant access
Allow from ###.###.###.### //this grants access

The computers and the server are all on the same network

Thanks

Marc