Received: (qmail 14232 invoked by uid 501); 12 Dec 2000 04:37:54 -0000 Message-Id: <20001212043754.14231.qmail@locus.apache.org> Date: 12 Dec 2000 04:37:54 -0000 From: Doug Baber Reply-To: douglas_va@yahoo.com To: submit@bugz.apache.org Subject: User directive must come before VirtualHost directive when specifying a named virtual host X-Send-Pr-Version: 3.110 >Number: 6959 >Category: config >Synopsis: User directive must come before VirtualHost directive when specifying a named virtual host >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: closed >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: apache >Arrival-Date: Mon Dec 11 20:40:00 PST 2000 >Closed-Date: Wed Jan 03 10:28:30 PST 2001 >Last-Modified: Wed Jan 03 10:28:30 PST 2001 >Originator: douglas_va@yahoo.com >Release: Apache/1.3.9 (NetRevolution Advanced Extranet Server/Linux-Mandrake) >Organization: >Environment: Linux angi 2.2.14-15mdk #1 Tue Jan 4 22:24:20 CET 2000 i586 unknown This is perl, version 5.005_03 built for i386-linux >Description: When configuring a named virtual host, the User directive must be specified before the VirtualHost directive, or a User directive must be included within the VirtualHost directive. I was configuring a virtual named virtual host. The host served web pages fine, but had a problem when executing a perl cgi script. The error messages below is what was generated in the ScriptLog. %stderr [Mon Dec 11 21:47:12 2000] [error] [client 192.168.1.2] (2)No such file or directory: getpwuid: invalid userid -1 [Mon Dec 11 21:47:12 2000] [error] (2)No such file or directory: exec of /home/httpd/jec/dev/cgi-bin/test.pl failed The getpwuid error seemed to indicate that it couldn't find the user name in the /etc/passwd file. I'm assuming it was trying to use a null user name to run the CGI program. Once I moved the User directive above the VirtualHost directive, it knew which user to run the CGI script as, and it worked fine. It also worked when I left the User directive after the VirtualHost directive, but put a User entry within the VirtualHost section. >How-To-Repeat: Set up an httpd.conf file with the above scenario and run the test.pl script that comes with Apache. >Fix: Add information to the documentation about this issue. >Release-Note: >Audit-Trail: From: Tony Finch To: Doug Baber Cc: apbugs@apache.org Subject: Re: config/6959: User directive must come before VirtualHost directive when specifying a named virtual host Date: Wed, 13 Dec 2000 22:10:25 +0000 Doug Baber wrote: > >>Release: Apache/1.3.9 (NetRevolution Advanced Extranet Server/Linux-Mandrake) Your problem is caused by the fact that you use the Mandrake version of Apache, which should in my opinion be shunned. It turns on too many optional features that should not be used unless an experienced admin has decided that they are needed. In your case the feature in question is suexec, and the "experienced admin" caveat applies in spades. In particular our documentation covers your problem if you use an unmodified Apache. Tony. -- f.a.n.finch fanf@covalent.net dot@dotat.at "You realize there's a government directive stating that there is no such thing as a flying saucer?" State-Changed-From-To: open-closed State-Changed-By: slive State-Changed-When: Wed Jan 3 10:28:29 PST 2001 State-Changed-Why: Probably not a bug in Apache or its documentation. >Unformatted: [In order for any reply to be added to the PR database, you need] [to include in the Cc line and make sure the] [subject line starts with the report component and number, with ] [or without any 'Re:' prefixes (such as "general/1098:" or ] ["Re: general/1098:"). If the subject doesn't match this ] [pattern, your message will be misfiled and ignored. The ] ["apbugs" address is not added to the Cc line of messages from ] [the database automatically because of the potential for mail ] [loops. If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request from a ] [developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]