Return-Path: X-Original-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0A2DCDBCE for ; Tue, 21 May 2013 21:53:20 +0000 (UTC) Received: (qmail 68495 invoked by uid 500); 21 May 2013 21:53:20 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 68459 invoked by uid 500); 21 May 2013 21:53:20 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 68451 invoked by uid 99); 21 May 2013 21:53:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 May 2013 21:53:20 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of seanmckaybeck@gmail.com designates 74.125.83.45 as permitted sender) Received: from [74.125.83.45] (HELO mail-ee0-f45.google.com) (74.125.83.45) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 May 2013 21:53:13 +0000 Received: by mail-ee0-f45.google.com with SMTP id l10so713225eei.18 for ; Tue, 21 May 2013 14:52:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=lRYTKqCj3Ow73Z+Aw3CIW/gX4Zr43Q9FxjiiVaHb/Y0=; b=KvGGbv6DjL3Eh0foZKBcCRiKhD7rLqWYFUYPlKjXixu0tV60wpCvBMRuZaoL/XlRZM Vle4a4IfdrflKiFtfSdplFmNPK4FUUNEDAVM2kvsZMHUfjmbCpRSG/5nHa2gxwjC6tP6 r2AggGI9Db+V+ZuQLppkjwhL45kWygDhxKf66U3ZrqeR4v9PpPyPwi/WlUhHGRbf1toD 6QEpfyDpv+sIZUAu6wkNyLfZqsxhERoOkIYEM5Yv5P3/kZdcDaTvaJlj+9dqmTUxj6F5 fO7mJePji8QSmgCMSD3ndH3ovGTdLHlJSh6sMFrHHZDFsdAjcfRAwSnfN/Kva9A6YlCF 4MfA== MIME-Version: 1.0 X-Received: by 10.14.111.5 with SMTP id v5mr11371491eeg.27.1369173173075; Tue, 21 May 2013 14:52:53 -0700 (PDT) Received: by 10.14.202.70 with HTTP; Tue, 21 May 2013 14:52:53 -0700 (PDT) In-Reply-To: <519BD9D1.3010907@gmail.com> References: <519BD9D1.3010907@gmail.com> Date: Tue, 21 May 2013 15:52:53 -0600 Message-ID: Subject: Re: Get name of config file for module From: Sean Beck To: modules-dev@httpd.apache.org Content-Type: multipart/alternative; boundary=089e016346449e1f2d04dd417825 X-Virus-Checked: Checked by ClamAV on apache.org --089e016346449e1f2d04dd417825 Content-Type: text/plain; charset=ISO-8859-1 Sorin, Is there a way to figure out the name of the config file in code so I can log it? Or even just the path to where it is. Also, I'm confused because you said there is no such thing as a module-specific configuration file, but then you said configuration files can be split per-module. Does Apache just read out of httpd.conf on start-up and in httpd.conf I would use the Include directive to include my different configurations for each module? Thanks On Tue, May 21, 2013 at 2:32 PM, Sorin Manolache wrote: > On 2013-05-21 21:36, Sean Beck wrote: > >> Hi all, >> >> I have written a module and now would like to log the name of the actual >> config file being used by the module (there will be multiple modules on >> the >> server with their own config files. I looked through >> https://httpd.apache.org/docs/**2.4/developer/modguide.htmlbut am still >> struggling to understand how Apache knows what the config file is for each >> module and how I can check what the name of the actual name of the file is >> for each module. >> > > There is no such thing as a module-specific configuration file. In > principle a single file could contain the configuration for all modules. > > The configuration files are split per-module for convenience only, in > order to be able to activate modules independently. > > The configuration _directives_ are defined per-module (but actually > nothing stops you from defining the same configuration directive in several > modules). > > Apache defines a directive called "Include". This directive allows for the > splitting of the entire configuration into several files. But from apache's > point of view there is no correspondence between the files into which the > configuration is split and the modules that define the directives found in > those files. > > Sorin > > --089e016346449e1f2d04dd417825--