httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Bell <d...@plainblack.com>
Subject Re: [users@httpd] How to define constant in apache configuration?
Date Tue, 21 Apr 2009 01:31:52 GMT

On Apr 20, 2009, at 8:23 PM, Alfonsas Stonis wrote:

> 2009/4/20 Krist van Besien <krist.vanbesien@gmail.com>
>>
>> On Mon, Apr 20, 2009 at 7:37 AM, Alfonsas Stonis
>> <alfonsasstonis@gmail.com> wrote:
>>> Hi,
>>>
>>> I want to define constant that I will use latter in several places.
>>> Old documentation says that there was Define statement (or similar)
>>>
>>> Define myUrl "ldap://localhost"
>>> ...
>>> AuthLDAPUrl $myUrl
>>
>> I don't think that there was ever, in any version of Apache, a way to
>> do what you describe above.
>>
>>> However, there is nothing in current documentation (I was not able  
>>> to
>>> find the same or similar module).
>>>
>>> Can you tell me how to do it with apache2?
>>>
>>> I tried to search on web, but found only dozens of the same question
>>> (no answers). I tried:
>>>
>>> SetEnv myUrl "ldap://localhost"
>>> ...
>>> AuthLDAPUrl $myUrl
>>>
>>> Did not worked too.
>>
>> You can't do this in Apache. You could try using mod_perl, which
>> allows you to use perl statements in an apache config. But do you
>> really want this amount of complexity?
>>
>> Krist
>>
> I can not find now the definition, but there was some module for
> apache 1.3 (maybe it was third party) that allowed to write define.
> However, I found hard to believe that such basic thing would not be
> supported in apache 2 configuration. There should be some easy way to
> do this.
>

This is a configuration file, not a programming language. If you want,  
you can use Include to mimic the functionality.

Make a file with all the LDAP stuff you want, and then

Include conf/ldap.conf

In all the places you want the LDAP stuff to appear.

If this is unacceptable, then use mod_perl as was suggested before.

Doug Bell -- Senior Developer, Plain Black Corp.
[ http://plainblack.com ]
all that groks is

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message