You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2008/06/05 16:36:03 UTC

DO NOT REPLY [Bug 45139] New: Default config file does not take advantage of IfModule statements

https://issues.apache.org/bugzilla/show_bug.cgi?id=45139

           Summary: Default config file does not take advantage of IfModule
                    statements
           Product: Apache httpd-2
           Version: 2.2.3
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: All
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: thomas.schwanhaeuser@solvians.com


Hi,

in order to save memory, I tried to strip down a default installation of Apache
2.2.3 by commenting out all the default "LoadModules" in httpd.conf. By
eliminating the one which my application doesn't need I was able to reduce the
memory foot print by 50%.

Anyhow, I found this rather complicated, because if you for example remove the
cgi-module (because nowadays you don't need CGI anymore), you'll get an error
because of this default setting far lower in the config file.

ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"


Another example would be that if you drop mod_autoindex, this parameter here
makes trouble IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable


Because of the so many modules, Apache offers today, I suggest to clean this up
and make it more maintainable:

All parameters, which require a module to be loaded, should be wrapped in their
appropriate <IfModule foo.c> statements.


IMHO even better would be to move all module specific options into
conf.d/foo.conf files.

E.g. their would be a file called cgi.conf, it starts with the LoadModule
statement and all options relevant to CGI. If one doesn't want CGI, one just
has to remove the entire cgi.conf file.

For sanity, it could be better to introduce a subfolder with in conf.d, e.g.
the location for the default CGI settings would than be
/conf.d/modules/cgi.conf 


Would love your feedback,


Thomas


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 45139] Default config file does not take advantage of IfModule statements

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45139


Joshua Slive <sl...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |INVALID




--- Comment #3 from Joshua Slive <sl...@apache.org>  2008-06-05 17:13:49 PST ---
I think this discussion is irrelevant, because I believe the original poster
isn't even using the config file that comes with apache httpd 2.2. For example,
IndexOptions isn't even in the default config file.

If you look at the config file we distribute, you'll see that it does limit the
directives used in httpd.conf to a few core modules, and uses <IfModule> around
many of them. (Although I personally would rather see all the <IfModule> lines
removed for the reason Nick mentions.)

You're probably using a config file created by a third-party distributor.

And in general, if you want a "lean-and-mean" apache, the best thing to do is
start from an empty config file and build up from there.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 45139] Default config file does not take advantage of IfModule statements

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45139


Nick Kew <ni...@webthing.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX




--- Comment #1 from Nick Kew <ni...@webthing.com>  2008-06-05 07:51:57 PST ---
<IfModule> is a support nightmare: the lusers use it when a module isn't
loaded, then spend forever wondering why the module's directives don't work, no
matter what new variants they try.

Far better to have a simple, obvious and easy-to-fix one-off error.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 45139] Default config file does not take advantage of IfModule statements

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45139


Thomas Schwanhäuser <th...@solvians.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WONTFIX                     |




--- Comment #2 from Thomas Schwanhäuser <th...@solvians.com>  2008-06-05 09:37:35 PST ---
Hi Nick,

I understand your concern with higher support efforts for variant 1 and I'm on
your side that it might not be the perfect solution to exchange that in order
to lower configuration efforts.

But what do you think about variant 2? 

Packing all options relating to one LoadModule in one file within conf.d or
even conf.d/modules?


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org