httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sindhi Sindhi <>
Subject Re: Setting and accessing module specific directory
Date Sat, 11 May 2013 06:22:17 GMT
Had one more question. What is the right way of handling this - in which
location in Apache server directory should I be keeping my filter specific

As of now the XML and other files that are read by my filter are placed in
a new folder say "MyFilter" inside "httpd-2.4.4-win64\Apache24\htdocs". Is
this the right way of doing it?

Also, I have downloaded the 64-bit HTTP server from -<>
Is this the right official website to download Apache server?

On Wed, May 8, 2013 at 11:04 PM, Sorin Manolache <> wrote:

> On 2013-05-08 17:02, Sindhi Sindhi wrote:
>> 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"
> const char *ap_server_root in http_main.h (apache 2.2. It could be similar
> in 2.4) contains the ServerRoot.
> ap_server_root_relative in http_config.h allows you to compose paths
> relative to the ServerRoot.
> Sorin
>> Thanks.

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