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

Re: [users@httpd] define variables by vhost only


thanks for your answer.

Am 05.11.2018 um 14:00 schrieb Gillis J. de Nijs:
Alternatlvely, you can just put the AddHandler in the VirtualHost directly, and not bother with the .htaccess files.
yes, i have in Vhost a preconfigured addhandler which fits for most needs. These parts of VHost-Configurations are created automatically by our own customer-menu. The addhandler in .htaccess file should help people with some special requirements.
We moved from classic fastcgi to mod_proxy_fcgid, and we try to keep userspaceconfiguration unchanged, but seems to be impossible.
May be we should say good buy to our former use of addhandler to choose php-versions and only use the modern way. But its not easy for support-people. Its harder to support uneven machines with mixed setups.
The use of "define" was our closest attempt, but also seems to be off the track.

On Mon, Nov 5, 2018 at 9:43 AM Hajo Locke <Hajo.Locke@xxxxxx> wrote:
Hello List,

iam looking for a way to use define to create variables limited to
vhosts (apache 2.4).
Currently i have some vhosts and use this syntax:

define myvar mycontent.

Name of variables is in all vhosts the same, "mycontent" is different
and vhost related. Later i use this variable in .htaccess files for users:

Addhandler ${myvar} .php

Unfortunately define-directive defines the variable for complete server
and not to vhost only. so content of "myvar" gets overwritten with every
following vhost-config.
So if user A uses this variable, he sees content of variable created in
vhost for user z.

Is there a possibility to use variables limited to vhost but can be used
the same way in .htaccess files? I think setenv seems not suitable for this.


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