Jump to content

How to read module specific variable specified in virtual host directive


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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.