I think that to truly change the ServerAlias in all your processes you need to restart the server, but i could very well be wrong.

However, this is something i've wanted to do too, and the way i had been thinking about getting around an inability to add ServerAliases in the short term was to set up a catch all virtual host that would use the requests Host header to determine what it should ultimately do with the request.

In the scenario i was imagining i'd have an init handler that would run on the catch all vhost which would stuff a handful of variables into pnotes. My later phase code would then check for the existance of the pnotes variables, and either use them, or use it's normal route of doing whatever it was wanting to do.

If you were just adding additional server aliases for already set up sites you could just have your init handler redirect to the 'main' domain' of that alias or something like that.

Another option to think about anyway.

Adam



John ORourke wrote:
Hi folks,

I'm sure this has cropped up in the past but I can't see anything obvious in the archives (regex search on the archives would be great!)

I have some apps where users want to add extra domains and I'd like to do it on the fly if possible - in other words, modify the ServerAlias list from within mod_perl. Does anyone have any tips/pointers/archives?

thanks
John


Reply via email to