httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William A Rowe Jr <wr...@rowe-clan.net>
Subject Re: Problems using Apache::Test on Debian (and Ubuntu)
Date Tue, 07 Mar 2017 19:15:43 GMT
On Tue, Mar 7, 2017 at 12:59 PM, Stefan Fritsch <sf@sfritsch.de> wrote:
> On Tuesday, 7 March 2017 11:17:57 CET Eric Covener wrote:
>> On Tue, Mar 7, 2017 at 10:32 AM, William A Rowe Jr <wrowe@rowe-clan.net>
> wrote:
>> > It seems we should have the framework process the bin/envvars (in the
>> > normal path,  or /etc/apache2 in this case)... but that should be based
>> > on retrieving the
>> > pathname of bin/envvars from apxs, and apxs doesn't have this info (it
>> > also does not have two distinct entitites for the progname and config
>> > file name, requiring that both be overridden if the progname is changed.)
>>
>> Having a bit of trouble sorting out these two, but they don't seem to
>> affect the conf filename
>>
>> Apache-Test/lib/Apache/TestConfig.pm
>>   httpd           => 'server to use for testing (default is $bindir/httpd)',
>> target          => 'name of server binary (default is apxs -q TARGET)',
>>
>> e.g. this works for me:
>>
>> perl Makefile.PL  -apxs ~/SRC/httpd-trunk/built/bin/apxs -httpd
>> ~/SRC/httpd-trunk/built/bin/apachectl
>
> Yes, always using apachectl is probably the best solution. The alternative
> would have been to call something like
>
> env -i sh -c '. /etc/apache2/envvars; env'
>
> from Apache::Test and parse the output. But one would have to find the envvars
> file, first.

On Fedora, this is apparently /etc/sysconfig/httpd - although reduced
now to mostly
a no-op, as the systemd service config handles overriding any defines
or envvars...

[Service]
Type=notify
Environment=LANG=C
ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND
ExecReload=/usr/sbin/httpd $OPTIONS -k graceful

Agreed that apachectl solves a bunch of issues except SYSCONFDIR
and conf file name... we can extract this like so...

apachectl -V 2>/dev/null | sed "s# -D SERVER_CONFIG_FILE=##p;d;"
"conf/httpd.conf"

Mime
View raw message