Return-Path: Delivered-To: apmail-httpd-test-dev-archive@www.apache.org Received: (qmail 67915 invoked from network); 22 Jan 2005 01:15:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 22 Jan 2005 01:15:22 -0000 Received: (qmail 51535 invoked by uid 500); 22 Jan 2005 01:15:21 -0000 Delivered-To: apmail-httpd-test-dev-archive@httpd.apache.org Received: (qmail 51501 invoked by uid 500); 22 Jan 2005 01:15:21 -0000 Mailing-List: contact test-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: test-dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list test-dev@httpd.apache.org Received: (qmail 51488 invoked by uid 99); 22 Jan 2005 01:15:21 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from mail.logilune.com (HELO mail.logilune.com) (195.80.154.36) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 21 Jan 2005 17:15:19 -0800 Received: from [127.0.0.1] (localhost.logilune.com [127.0.0.1]) by mail.logilune.com (Postfix) with ESMTP id BB0DA1E1715 for ; Sat, 22 Jan 2005 02:15:15 +0100 (CET) Message-ID: <41F1A921.6080200@stason.org> Date: Fri, 21 Jan 2005 20:15:13 -0500 From: Stas Bekman Organization: Hope, Humanized User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041217 X-Accept-Language: en-us, en, he, ru MIME-Version: 1.0 To: test-dev@httpd.apache.org Subject: Re: A-T: httpd.conf.in References: <41E6DE7C.2060006@stason.org> <200501141225.32535.oeriksson@mandrakesoft.com> <41E81453.1010608@stason.org> <200501150756.56410.oeriksson@mandrakesoft.com> In-Reply-To: <200501150756.56410.oeriksson@mandrakesoft.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Oden Eriksson wrote: Sorry for dropping out of site, hardware problems here, my notebook is dead again :( too much modperl smoking is not good for a notebook's health. I wish somebody was sending me a new one :) >>>The server fails to start, but that's something else. I noticed though >>>that if the /etc/httpd/conf/httpd.conf exists A-T is trying to inherit >>>that config (inherit_config) but this fails as this file is for >>>apache-1.x. Shouldn't something from "httpd2 -V" be used instead? >> >>Take a look at: lib/Apache/TestConfigParse.pm:sub inherit_config { >>it should find the correct global config file, please check that code to >>see if something goes wrong. > > > I looked at it but it's hard to understand. I couldn't find where it actually > looks for the httpd.conf file. it's right here: 1) my $file = $self->{vars}->{httpd_conf}; 2) unless ($file and -e $file) { if (my $base = $self->{httpd_basedir}) { my $default_conf = $self->{httpd_defines}->{SERVER_CONFIG_FILE}; $default_conf ||= catfile qw(conf httpd.conf); $file = catfile $base, $default_conf; # SERVER_CONFIG_FILE might be an absolute path $file = $default_conf if !-e $file and -e $default_conf; } } (1) is set if you've passed an explicit -httpd_conf option to t/TEST (or perl Makefile.PL). otherwise (2) is invoked, so you can see that it gets the base dir of the server and looks for conf/httpd.conf under it. So in your case it's probably that httpd_basedir gets a wrong value. The latter gets set in TestConfig.pm: if ($vars->{httpd}) { my @chunks = splitdir $vars->{httpd}; #handle both $prefix/bin/httpd and $prefix/Apache.exe for (1,2) { pop @chunks; last unless @chunks; $self->{httpd_basedir} = catfile @chunks; last if -d "$self->{httpd_basedir}/bin"; } } so it tries to find the root of the Apache install. As this of any help? >>>Also the mod_perl module as all other code is built as non root, so >>>certain files and directories can't be access. The snipppet above solves >>>some of that. >> >>A-T handles that internally. See >> >> lib/Apache/TestRun.pm:sub adjust_t_perms { >> >>if you intervene with normal process, then you are on your own. >> >>I still can't understand what's wrong with the autogenerated httpd.conf, >>that you need to write your own. Please explain. > > > Ok. As it cannot find the correct httpd.conf file I have to do it like this. > But I suspect even if it would, it wouldn't work anyway as we use two main > config files and includes specific module config files using the scandir > feature (Include conf.d/*.conf). And A-T should be able to do that just fine. > SUSE does it like that too, as well as > RedHat, PLD, ALTLinux, and perhaps many more. As a non root user I do not > have permissions to write a PidFile or LockFile unless it's in a directory I > have permissions to. I don't understand that. Both PidFile or LockFile are rewritten by A-T to point to t/logs/ check TestConfig.pm's __DATA__ section. There should be no perms problems. > I would be happy if I could disable this inherit_config thing so it does not > search for any configuration files at all. it's easy: just pass your specific -httpd_conf option and point it to the file that you create by yourself. -- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:stas@stason.org http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com