> From: phark...@gmail.com [mailto:phark...@gmail.com] On Behalf Of > Perrin Harkins > Sent: Friday, November 18, 2011 5:57 PM > To: Josh Narins > > On Fri, Nov 18, 2011 at 5:27 PM, Josh Narins <jnar...@seniorbridge.com> > wrote: > > Thanks, Perrin, but the server isn't starting when I get this error. > > It's not? You can't define Location blocks and the like after the > server has started. Maybe I'm not understanding what you're saying.
My httpd.conf has three sections. One is LoadModule perl_module modules/mod_perl.so and PerlOptions +GlobalRequest. Another is a block of PerlPassEnv, and third is a <Perl> section. The main part of the <Perl> section is to create and then get the output of an HTML::Template, which includes all the other httpd configuration, like <Locations>, rewrites, et cetera. So, different ways to get this config to apache include: my $r = Apache2::RequestUtil->request; $r->add_config($template->output); But that results in the error "Global $r object is not available." and the server does not start. The other two, similar, ways I know about involve $PerlConfig and @PerlConfig, and while neither prevents server startup, Apache2::Directive shows that they didn't do anything, with or without the hack mentioned by Randal here: http://www.gossamer-threads.com/lists/modperl/modperl/85304?do=post_view_threaded#85304 And, just so we are all sure, $template->output produces both the content I expect and content that works to start the server. If I simply replace the <Perl> section with the generated output the server starts. > I'm not sure I can help with the larger issue since I always stay away > from $PerlConfig. I prefer to generate the entire config file as a > template, so that I can use it for the front-end proxy as well. Josh Narins Director of Application Development SeniorBridge 845 Third Ave 7th Floor New York, NY 10022 Tel: (212) 994-6194 Mobile: (917) 488-6248 Fax: (212) 994-4260 jnar...@seniorbridge.com SeniorBridge Managing Complex Chronic Care http://www.seniorbridge.com SeniorBridge Statement of Confidentiality: The contents of this email message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. Any dissemination, distribution or copying of this email by an unintended or mistaken recipient is strictly prohibited. In said event, kindly reply to the sender and destroy all entries of this message and any attachments from your system. Thank you.