develooper Front page | perl.combust.users | Postings from July 2003

apache/conf/httpd.tmpl troubles

Thread Next
From:
Ed Summers
Date:
July 28, 2003 11:08
Subject:
apache/conf/httpd.tmpl troubles
Message ID:
20030728181348.GK1536@karma.dancygier.com
I recently did a svn update, and attempted to restart my combust. 

[combust@esummers combust]$ bin/run_httpd 
$x = \{
         'perl4lib' => {
                         'servername' => 'esummers.flr.follett.com'
                       }
       };
Use of uninitialized value in concatenation (.) or string at
/home/combust/apache/conf/startup.pl line 1.
Syntax error on line 266 of /home/combust/apache/conf/httpd.conf:
ServerName takes one argument, The hostname of the server


So I took a peek inside apache/conf/httpd.tmpl and found:


[% FOREACH site = config.sites_list %]
  # [% site %]
[% IF config.site.$site.servername;
     PROCESS "sites/qa.tmpl";
   ELSE %]
    # ServerName for [% site %] not configured in combust.conf!
[% END;
   END %]


I thought it was odd that 'qa' was hardcoded in there, so I modified it
like so:


[% FOREACH site = config.sites_list %]
  # [% site %]
[% IF config.site.$site.servername;
     tmplFile = 'sites/' _ site _ '.tmpl';
     PROCESS $tmplFile;
   ELSE %]
    # ServerName for [% site %] not configured in combust.conf!
[% END;
   END %]

Perhaps there's a cleaner way to do this, or it's not right anyway. It
did allow me to restart my combust however :) 

//Ed

ps. combust++

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About