|
|
|
|
||||||
| alt.apache.configuration Apache web server configuration issues. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hello. I am trying to install a large system on a web server I don't run,
and the people who do have screwed up the setting of $SCRIPT_NAME horribly. Unfortunately SCRIPT_NAME is used in many places throughout the system I am trying to install. I thought I could set it in .htaccess with mod_rewrite, but it appears that the web host prohibits this (results in 403, and yes, I did try +FollowSymLinks). Is there any other way of setting an environment variable in .htaccess? -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
[ Peter Scott ]
> Hello. I am trying to install a large system on a web server I don't > run, and the people who do have screwed up the setting of > $SCRIPT_NAME horribly. Unfortunately SCRIPT_NAME is used in many > places throughout the system I am trying to install. I thought I > could set it in .htaccess with mod_rewrite, but it appears that the > web host prohibits this (results in 403, and yes, I did try > +FollowSymLinks). > > Is there any other way of setting an environment variable in > .htaccess? You don't specify which Apache-version you run, but have a look at the docs: http://httpd.apache.org/docs/2.2/env.html Note the context of the directives (e.g. 'SetEnv' can be used in a ..htaccess). If you use another version of Apache, see its documentation. Rgds, Kenneth Svee |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Fri, 13 Oct 2006 17:17:28 +0200, Kenneth Svee wrote:
>> Is there any other way of setting an environment variable in .htaccess? > > You don't specify which Apache-version you run, but have a look at the > docs: > > http://httpd.apache.org/docs/2.2/env.html > > Note the context of the directives (e.g. 'SetEnv' can be used in a > .htaccess). > > If you use another version of Apache, see its documentation. Thanks. I tried to make this work on my own web server first, which is "Apache/2.2.0 (Fedora)" and couldn't get it to work. I turned selinux off first (setenforce 0) to be on the safe side and restarted Apache. I have a .htaccess in my ~/public-html/ containing: Options ExecCGI SetEnv FOO bar and in my httpd.conf I have: <Directory "/home/*/public_html"> AllowOverride FileInfo Options Options Indexes FollowSymLinks Order allow,deny Allow from all </Directory> But a CGI in the same directory that lists all environment variables doesn't show FOO. I tried putting the SetEnv in the global config block above and that didn't . Nothing in the error_log. mod_env is loaded. I tried SetEnvIf as well and it didn't work. I also tried AllowOverride All. I also tried UnSetEnv SERVER_SOFTWARE and that didn't work (although I think I'm not supposed to be able to unset that one). I figure if I can't make this work on my own system first I won't know what I'm doing on the target system. What have I missed? -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ |
|
![]() |
| Outils de la discussion | |
|
|