How to allow from SERVER_ADDR ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I did not find a solution for this:

I want to restrict access to certain files to requests coming from the same public ip address the server is running on, like so:

<files wp-login.php>
order deny,allow
deny from all
allow from xx.xx.xx.xx
</files>

To make it more maintainable I would like to use the %{SERVER_ADDR} environment variable, but this does not work:

<files wp-login.php>
order deny,allow
deny from all
allow from %{SERVER_ADDR}
</files>

I tried syntax variations, also combined with SetEnfIf but still no success.

How can I allow access only if REMOTE_ADDR == SERVER_ADDR ?

Thanks!
Bughunter

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx





[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux