mod_tile icon indicating copy to clipboard operation
mod_tile copied to clipboard

Defer hostname determination to the post_config hook

Open tomhughes opened this issue 12 years ago • 6 comments

This is an untested (compiled but not run) attempt to fix #41 by deferring the looking up of the hostname until the post_config hook.

tomhughes avatar Aug 13 '13 08:08 tomhughes

It looks like it doesn't work.

scfg->configs->nelts appears to be 0 in the post_config hook and so the code is never executed.

apmon avatar Aug 13 '13 16:08 apmon

Is that just the first time it is called or is that still true the second time?

tomhughes avatar Aug 13 '13 16:08 tomhughes

Unfortunately it seems to be true for both.

apmon avatar Aug 13 '13 16:08 apmon

Hmmm... Of course if there was actually any decent documentation for the apache module API then it might be easier to figure these things out...

tomhughes avatar Aug 13 '13 16:08 tomhughes

There definitely seems to be a lack of documentation when exactly these hooks get called and how to fully use them

I think I might have tried a very similar thing in the past as well and it didn't work. Particularly I think it was getting the initial configuration Notice (you refer to in your other ticket) off the console and into the logs.

apmon avatar Aug 13 '13 17:08 apmon

This doesn't seem to work for me. However, Tom has verified that it does work for him on both apache 2.2 and apache 2.4. Can anyone else verify if it works for them or not? Or might have an idea what is different? My guess is that it might have something to do about where things are defined. I.e. in the virtual server config or the general server, but I couldn't so far make it work to support this guess.

apmon avatar Aug 19 '13 01:08 apmon