Deny from env=env-variable Does not work


 
Thread Tools Search this Thread
Top Forums Web Development Deny from env=env-variable Does not work
# 1  
Old 01-21-2012
Deny from env=env-variable Does not work

Quote:
mod_authz_host, in conjunction with mod_setenvif, can be used to restrict access to your website based on the value of arbitrary environment variables. This is done with the Allow from env= and Deny from env= syntax.

Code:
SetEnvIf User-Agent BadBot GoAway=1
    Order allow,deny
    Allow from all
    Deny from env=GoAway

(Above from Apache docs).

On my system, using:

Code:
SetEnvIf User-Agent Mozilla IsBad=1
Order allow,deny
Allow from all
Deny from env=IsBad

...I see that environment variable is set (using phpinfo()) but the page is still served. No errors in the Apache logs.
# 2  
Old 01-31-2012
Still can't solve this one, although the following inside the same Directory container does:
Code:
<Files *>
order deny,allow
deny from 58.218.0.0/16 etc
</Files>

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Env variable in solaris

Hi, Am installing SAP on Solaris 10. How to set env variables permanently? Reg (0 Replies)
Discussion started by: daggupati453
0 Replies

2. Shell Programming and Scripting

Env variable

Hello, I want to cange env variable on SunOS. I tried: export GONGA=$GONGA:/users/BANK1/basic/queues/SARON_SPACE1 it changed it only localy for my session. when i opened a new session (telnet etc') the old value exist. How can I change it to effact all sessions. Thanks. (2 Replies)
Discussion started by: LiorAmitai
2 Replies

3. Shell Programming and Scripting

get env variable from last script

I have 2 scripts t2.sh calls t1.sh. I need to get the vaule of a env variable from t1.sh /tmp/test$ cat t1.sh #!/bin/sh INSTANCE="font/fc-cache" export INSTANCE svcadm disable ${INSTANCE} /tmp/test$ cat t2.sh #!/bin/sh . /tmp/test/t1.sh echo ${INSTANCE} The above works... (9 Replies)
Discussion started by: honglus
9 Replies

4. Shell Programming and Scripting

Doubt on ENV variable

Question 1: If I set ENV=$HOME/myenvprofile.ksh, will my script get executed when ever I login to my with KSH. My doubt is we used to put this in .profile of our home directory. SO when ever I login will it executed? QUestion 2: If I set ENV=`echo "hi"` or 'echo "hi" ', what would be the output.... (0 Replies)
Discussion started by: ramkrix
0 Replies

5. UNIX for Dummies Questions & Answers

Env Variable

Hi, I have a doubt on Environment variable. I want to know where and when the envirnment variables are defined? Thanks & Regards, Siba (1 Reply)
Discussion started by: siba.s.nayak
1 Replies

6. UNIX for Dummies Questions & Answers

PWD env variable

Could you please tell me, which process / file is responsible for the setting of PWD env variable in Solaris Thanks (1 Reply)
Discussion started by: chaandana
1 Replies

7. Shell Programming and Scripting

bash env variable containing @

I want to set a bash env variable which has @ in its name, for example, @YOGESH@ may i know how do i do this? (4 Replies)
Discussion started by: Yogesh Sawant
4 Replies

8. Shell Programming and Scripting

Some env setting is causing the script not to work ?

Not sure what has changed in the Unix environment. The following script which was working is now not working. #!/usr/bin/ksh # ----------------------------------------------------------------------------- # File: monitor_db.sh # #... (1 Reply)
Discussion started by: uuser
1 Replies

9. Shell Programming and Scripting

Adding command line env in cron env

Hello friends, i run two scripts manually & they work. i run them in cron & they don work. how to match the two env's 1.command line env 2.cron env i would like cron to use command line env. Thanks & Regards Abhijeet (1 Reply)
Discussion started by: abhijeetkul
1 Replies

10. UNIX for Dummies Questions & Answers

PWD env variable for root

How do you get the $PWD env variable set for root? I know it's automatic for korn and other shells, but root uses /usr/bin/sh. (5 Replies)
Discussion started by: bcole23
5 Replies
Login or Register to Ask a Question