You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Josh Marcus <jo...@babel.serve.com> on 2002/11/25 23:53:20 UTC

[users@httpd] User cannot occur within section

I'm trying to use a User directive within a VirtualHost configuration under
my new apache 2.0.x installation.  I'm getting:

User cannot occur within <VirtualHost> section

... what do I need to do to enable this?  My configuration worked fine under
1.3.x.  Has suexec/httpd's behavior changed? 

--j 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] User cannot occur within section

Posted by Josh Marcus <jo...@babel.serve.com>.
This solved my problem.  For anyone else who has this problem--

What was once ..

<VirtualHost domain.com>
User username
Group foo
</VirtualHost>

now becomes

<VirtualHost domain.com>
SuexecUserGroup username foo
</VirtualHost>

<VirtualHost 
On Tue, Nov 26, 2002 at 12:13:35AM +0100, Sebastian Wolfgarten wrote:
> Hello,
> 
> the "User" directive is not supported by
> Apache 2.x anymore (in a vh context), see
> http://httpd.apache.org/docs-2.0/mod/mpm_common.html#user
> and use other (more appropriate) directive(s)
> like SuexecUserGroup or mpm's (like perchild).
> 
> Bye, Sebastian
> 
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] User cannot occur within section

Posted by Josh Marcus <jo...@babel.serve.com>.
To make sure everything was copasetic in terms of having suexec
installed, I ran a little perl cgi which printed out the uid/gid
the cgi was ran as and ran it under a user homedir and it the uid/gid
reflected the user -- so suexec is definitely working in the normal
case, but not in the VirtualHost case. --j
On Mon, Nov 25, 2002 at 06:06:03PM -0500, Josh Marcus wrote:
> I *think* I have suexec enabled.  Here's the output of httpd -l,
> which shows it.  Any further advice?  --j
> 
> [root@shiraz bin]# ./httpd -l
> Compiled in modules:
>   core.c
>   mod_access.c
>   mod_auth.c
>   mod_include.c
>   mod_log_config.c
>   mod_env.c
>   mod_expires.c
>   mod_setenvif.c
>   mod_proxy.c
>   proxy_connect.c
>   proxy_ftp.c
>   proxy_http.c
>   mod_ssl.c
>   prefork.c
>   http_core.c
>   mod_mime.c
>   mod_status.c
>   mod_autoindex.c
>   mod_asis.c
>   mod_info.c
>   mod_suexec.c  <-- *** here we go *** 
>   mod_cgi.c
>   mod_vhost_alias.c
>   mod_negotiation.c
>   mod_dir.c
>   mod_imap.c
>   mod_actions.c
>   mod_speling.c
>   mod_userdir.c
>   mod_alias.c
>   mod_rewrite.c
>   mod_so.c
> 
> --j
> On Tue, Nov 26, 2002 at 10:00:15AM +1100, Zac Stevens wrote:
> > On Mon, Nov 25, 2002 at 05:53:20PM -0500, Josh Marcus wrote:
> > > I'm trying to use a User directive within a VirtualHost configuration under
> > > my new apache 2.0.x installation.  I'm getting:
> > > 
> > > User cannot occur within <VirtualHost> section
> > > 
> > > ... what do I need to do to enable this?  My configuration worked fine under
> > > 1.3.x.  Has suexec/httpd's behavior changed? 
> > 
> > Sounds like you just don't have suexec enabled.  Does the output of
> > 'httpd -l' include anything to indicate that it is?  It should say
> > something along the lines of:
> > 
> > suexec: enabled; valid wrapper /usr/local/apache/bin/suexec
> > 
> > (although the actual path will vary depending upon where you have it
> > installed)
> > 
> > HTH,
> > 
> > 
> > Zac
> > 
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] User cannot occur within section

Posted by Zac Stevens <zt...@cryptocracy.com>.
<following up own post>

Whoops, that's all completely bogus - per Sebastian's mail.

I inadvertantly checked against a 1.3 binary!


Zac

On Tue, Nov 26, 2002 at 10:14:18AM +1100, Zac Stevens wrote:
> Hi Josh,
> 
> On Mon, Nov 25, 2002 at 06:06:03PM -0500, Josh Marcus wrote:
> > I *think* I have suexec enabled.  Here's the output of httpd -l,
> > which shows it.  Any further advice?  --j
> 
> That just means you've passed "--enable-suexec" to configure, which is
> important but not the whole story.  When configuring the source tree, you
> need to also supply a number of --with-suexec-<foo> options, to specify the
> location of the suexec binary as well as a number of safeguards.
> 
> Have a look at the output of "./configure --help" in the root of your
> source tree.  The suexec bits are almost at the end of the listing.
> 
> HTH,
> 
> 
> Zac

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] User cannot occur within section

Posted by Zac Stevens <zt...@cryptocracy.com>.
Hi Josh,

On Mon, Nov 25, 2002 at 06:06:03PM -0500, Josh Marcus wrote:
> I *think* I have suexec enabled.  Here's the output of httpd -l,
> which shows it.  Any further advice?  --j

That just means you've passed "--enable-suexec" to configure, which is
important but not the whole story.  When configuring the source tree, you
need to also supply a number of --with-suexec-<foo> options, to specify the
location of the suexec binary as well as a number of safeguards.

Have a look at the output of "./configure --help" in the root of your
source tree.  The suexec bits are almost at the end of the listing.

HTH,


Zac

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] User cannot occur within section

Posted by Sebastian Wolfgarten <se...@gmx.net>.
Hello,

the "User" directive is not supported by
Apache 2.x anymore (in a vh context), see
http://httpd.apache.org/docs-2.0/mod/mpm_common.html#user
and use other (more appropriate) directive(s)
like SuexecUserGroup or mpm's (like perchild).

Bye, Sebastian



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] User cannot occur within section

Posted by Josh Marcus <jo...@babel.serve.com>.
I *think* I have suexec enabled.  Here's the output of httpd -l,
which shows it.  Any further advice?  --j

[root@shiraz bin]# ./httpd -l
Compiled in modules:
  core.c
  mod_access.c
  mod_auth.c
  mod_include.c
  mod_log_config.c
  mod_env.c
  mod_expires.c
  mod_setenvif.c
  mod_proxy.c
  proxy_connect.c
  proxy_ftp.c
  proxy_http.c
  mod_ssl.c
  prefork.c
  http_core.c
  mod_mime.c
  mod_status.c
  mod_autoindex.c
  mod_asis.c
  mod_info.c
  mod_suexec.c  <-- *** here we go *** 
  mod_cgi.c
  mod_vhost_alias.c
  mod_negotiation.c
  mod_dir.c
  mod_imap.c
  mod_actions.c
  mod_speling.c
  mod_userdir.c
  mod_alias.c
  mod_rewrite.c
  mod_so.c

--j
On Tue, Nov 26, 2002 at 10:00:15AM +1100, Zac Stevens wrote:
> On Mon, Nov 25, 2002 at 05:53:20PM -0500, Josh Marcus wrote:
> > I'm trying to use a User directive within a VirtualHost configuration under
> > my new apache 2.0.x installation.  I'm getting:
> > 
> > User cannot occur within <VirtualHost> section
> > 
> > ... what do I need to do to enable this?  My configuration worked fine under
> > 1.3.x.  Has suexec/httpd's behavior changed? 
> 
> Sounds like you just don't have suexec enabled.  Does the output of
> 'httpd -l' include anything to indicate that it is?  It should say
> something along the lines of:
> 
> suexec: enabled; valid wrapper /usr/local/apache/bin/suexec
> 
> (although the actual path will vary depending upon where you have it
> installed)
> 
> HTH,
> 
> 
> Zac
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] User cannot occur within section

Posted by Zac Stevens <zt...@cryptocracy.com>.
On Mon, Nov 25, 2002 at 05:53:20PM -0500, Josh Marcus wrote:
> I'm trying to use a User directive within a VirtualHost configuration under
> my new apache 2.0.x installation.  I'm getting:
> 
> User cannot occur within <VirtualHost> section
> 
> ... what do I need to do to enable this?  My configuration worked fine under
> 1.3.x.  Has suexec/httpd's behavior changed? 

Sounds like you just don't have suexec enabled.  Does the output of
'httpd -l' include anything to indicate that it is?  It should say
something along the lines of:

suexec: enabled; valid wrapper /usr/local/apache/bin/suexec

(although the actual path will vary depending upon where you have it
installed)

HTH,


Zac

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org