httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sindhi Sindhi <sindhi....@gmail.com>
Subject Setting and accessing module specific directory
Date Wed, 08 May 2013 15:02:29 GMT
Hi,

I have written a C++ Apache module that performs filtering of HTML content.

There are some XML files which are read by this filter when it does the
filtering. During run-time when this filter is invoked, I'd want the filter
pick up these XML files and read them. I was thinking these XML files can
be placed in the server location "C:\Program
Files\httpd-2.4.4-win64\Apache24\htdocs\MyFilter\". where MyFilter folder
will contain all the XML files needed by my filter. How do I access this
location programatically during run-time when the filter is invoked?

How can I get the absolute path of the server installation loacation
(C:\Program Files\httpd-2.4.4-win64\Apache24\htdocs\) so that I can append
"MyFilter\" to the same to get the location of the XML files?

I have specified the below in httpd.conf file:
DocumentRoot "C:/Program Files/httpd-2.4.4-win64/Apache24/htdocs"
ServerRoot "C:/Program Files/httpd-2.4.4-win64/Apache24"

The signature of my filter looks like this -
static apr_status_t myHtmlFilter(ap_filter_t *f, apr_bucket_brigade *pbbIn)

I will need the document root or server root or any other path variable
that I can access from my filter that will give me the absolute path
"C:/Program Files/httpd-2.4.4-win64/Apache24"

Thanks.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message