Jump to content

How to read module specific variable specified in virtual host directive


Ankit

Recommended Posts

Hi, I am trying to read my module specific variable defined in virtualHost directive through c++ module code. Basically my requirement is to read module specific directive on request basis not on server start up.

 

for example:-

i have following snippet in apache httpd.conf file.

LoadModule obModule "E:\apache2wg\module.dll"

 

and inside virtualHost directive.

<VirtualHost *:17000>

    DocumentRoot G:/Apache2/virtual_host

    ServerName dummy.ps3682.abc.co.in

    DebugLevel 3

/VirtualHost>

 

Now my problem is to read DebugLevel while serving the request. I have registered it using AP_INIT_TAKE1 so i am not getting any server start-up issue, but problem is how can i read it from request_rec.

I tried to use

ap_get_module_config(r->per_dir_config, &obModule); while serving request but did not its value.

Can anyone help me to find out way to do it.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.