Mailing List Archive

Mod_expires fun
Anyone else had fun with the mod_expires module on an install of the dev branch? I've found I need to comment out the LoadModule for it in the bricolage httpd.conf, as it gets built in to apache during the install, and is not a module.

I'm just wondering what's more common when people build things terms of whether or not that line should be in the conf.

-matt
Re: Mod_expires fun [ In reply to ]
On Jan 21, 2010, at 7:28 AM, Matt Rolf wrote:

> Anyone else had fun with the mod_expires module on an install of the dev branch? I've found I need to comment out the LoadModule for it in the bricolage httpd.conf, as it gets built in to apache during the install, and is not a module.
>
> I'm just wondering what's more common when people build things terms of whether or not that line should be in the conf.

It's not in the httpd.conf file unless inst/htprobe_apache2.pl fails to detect it. It'd be worth finding out why it failed to detect it on your system.

Best,

David
Re: Mod_expires fun [ In reply to ]
On Jan 21, 2010, at 12:06 PM, David E. Wheeler wrote:

> It's not in the httpd.conf file unless inst/htprobe_apache2.pl fails to detect it. It'd be worth finding out why it failed to detect it on your system.

This is what I did, which seems to have caused the weirdness.

I installed the CMS, and not particularly caring about recompiling for mod_expires at some point, removed that module from line 256 (or whatever it is) of the htprobe_apache2.pl (which, btw, had no issues with apreq2 last night).

So then that line showed up in the conf. The first time it showed up wrong, something like "Loadmodule mod_expires", which obviously didn't work. The next install, it was a proper LoadModule line. But because I didn't build apache with the module, it couldn't find it. Comment out the line and apache starts up.

Now, when I rebuilt the server later, I compiled mod_expires in, but there was no .so module. The line still showed up, and of course failed. This appears to be because the htprobe file was still in a bad way from my edits, which was why it didn't detect mod_expires.

So in theory what happened to me shouldn't be an issue for anyone else. But for me the behavior is somewhat curious. Why would it put in a LoadModule line if it doesn't detect the module? And there's some LoadModule lines for apreq2 and mod_perl, too, even though they are detected and work.

I feel like the LoadModule lines weren't always at the top of httpd.conf, but I could very well be imagining things. I've always had to put them in the apache2/httpd.conf so they get detected.



-Matt
Re: Mod_expires fun [ In reply to ]
On Jan 21, 2010, at 12:57 PM, Matt Rolf wrote:

> So in theory what happened to me shouldn't be an issue for anyone else. But for me the behavior is somewhat curious. Why would it put in a LoadModule line if it doesn't detect the module? And there's some LoadModule lines for apreq2 and mod_perl, too, even though they are detected and work.

It should detect it if it's included statically, and die if it can't detect it at all.

> I feel like the LoadModule lines weren't always at the top of httpd.conf, but I could very well be imagining things. I've always had to put them in the apache2/httpd.conf so they get detected.

Yeah, they've always been at the top. FWIW, a build I made yesterday has these three lines:

LoadModule perl_module /usr/local/apache2/modules/mod_perl.so
LoadModule expires_module modules/mod_expires.so
LoadModule apreq_module modules/mod_apreq2.so

And it works perfectly.

Best,

David
Re: Mod_expires fun [ In reply to ]
On Jan 21, 2010, at 4:06 PM, David E. Wheeler wrote:

> Yeah, they've always been at the top. FWIW, a build I made yesterday has these three lines:
>
> LoadModule perl_module /usr/local/apache2/modules/mod_perl.so
> LoadModule expires_module modules/mod_expires.so
> LoadModule apreq_module modules/mod_apreq2.so
>
> And it works perfectly.

Yes, that's what mine looked like before I started futzing with it.

-Matt