You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by JingTian <ji...@gmail.com> on 2009/07/01 07:49:11 UTC

Re: [users@httpd] I want a file can be accessed by some ip only, how to do that?

i think you should put the two file in different dirs,and use Allow,Deny
dictate to do the access control,

for example:

<Directory "/index1">
    Order deny,allow
    Allow from 10.5.0.0/255.255.0.0
    Allow from 127.0.0.1
    Deny from all
</Directory>

hope this help.


2009/7/1 Yi Zhao <zh...@yahoo.com.cn>

> hi, all:
> I have 2 file(index.html, run.log) in directory: index/, now both can be
> accessed by all people, but I want do that:
> run.log can be accessed by some specified ip only, how to do that?
>
>
> thanks
>
>


-- 
Tianjing

MSN:tianjing217@hotmail.com <MS...@hotmail.com>

Re: [users@httpd] I want a file can be accessed by some ip only, how to do that?

Posted by Darryle Steplight <ds...@gmail.com>.
OR do the same thing except instead of using the <directory> directive use
<Files run.log>

  Order deny,allow
    Allow from 10.5.0.0/255.255.0.0
    Allow from 127.0.0.1
    Deny from all

</Files>

On Wed, Jul 1, 2009 at 1:49 AM, JingTian<ji...@gmail.com> wrote:
> i think you should put the two file in different dirs,and use Allow,Deny
> dictate to do the access control,
>
> for example:
>
> <Directory "/index1">
>     Order deny,allow
>     Allow from 10.5.0.0/255.255.0.0
>     Allow from 127.0.0.1
>     Deny from all
> </Directory>
>
> hope this help.
>
>
> 2009/7/1 Yi Zhao <zh...@yahoo.com.cn>
>>
>> hi, all:
>> I have 2 file(index.html, run.log) in directory: index/, now both can be
>> accessed by all people, but I want do that:
>> run.log can be accessed by some specified ip only, how to do that?
>>
>>
>> thanks
>
>
>
> --
> Tianjing
>
> MSN:tianjing217@hotmail.com
>



-- 
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

---------------------------------------------------------------------
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