homepage Welcome to WebmasterWorld Guest from 23.23.22.200
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Disable/bypass custom apache modules?
apache apache2 modules
cvillone




msg:4545385
 5:05 pm on Feb 13, 2013 (gmt 0)

Hi all,
So I asked the question below on stackoverflow.com and serverfault.com and got NO responses. Maybe someone here is better :)


Question below:


I have an apache server running on an embedded device that serves webpages to clients using a bunch of custom modules.

I'm now trying to load some webpages from the device using [127.0.0.1...]

These pages don't need any of the custom modules since they don't use any of their processing.

The problem is apache still runs through all the modules when loading the page and this causes the page to load very slowly even though it's coming from the local filesystem. I've tried using file: to retrieve the pages but then some pages don't display correctly because we are using jquery.

All the pages that don't need the modules are in a specific directory "foo" under the 'DocumentRoot'

I've tried putting checks in all the modules to disable the processing but it's still isn't good enough because it still runs through the modules.

Is there a way for me to add another module that makes a check and then stops all the rest from running?
Can this be done with AddHandler/RemoveHandler, mod_rewrite?
I've tried
<Location /foo>
SetHandler None
</Location>

and that didn't work.

Can I make these files have a different extension like .fhtml and use that?

Other ideas?

We're running Apache/2.2.22 (Unix)

 

coopster




msg:4547211
 7:07 pm on Feb 20, 2013 (gmt 0)

Welcome to WebmasterWorld, cvillone.

LoadModule only works in the context of server config which means it is going to either fire up the module or not. How the module is invoked is another story. For example, mod_rewrite is a directive specific to the rewrite module and is only invoked when the RewriteEngine is On, even though the module can be loaded at http server startup.

I would hope your custom modules would have a similar directive that allow you to invoke or not invoke the process accordingly. That's where I would start anyway.

lucy24




msg:4547272
 1:03 am on Feb 21, 2013 (gmt 0)

I realize this is tangential to your question but this line worries me:

The problem is apache still runs through all the modules when loading the page and this causes the page to load very slowly...


Is there something special about your local pages that interacts with the modules to make the pages load slowly, while the ordinary, user-accessible pages aren't affected? Otherwise it sounds as if all pages load slowly all the time-- but for some reason this isn't a cause for concern. I really, really don't want to read the question as saying that slow performance is OK for the public but not for you ;)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved