Aha!  My account's group is "domain users" (with the space), coming from 
the SSSD/Active Directory login management.  So Apache is seeing GROUP 
domain users, and thinks there are two parameters because of the space.

Googling, I see other mentions of "domain users" group with AD-managed 
linux boxes.  If you had GROUP "${MOD_WSGI_GROUP}" (with the quotes) in 
your template, I think Apache would be happy, with no side effects?  Or 
perhaps using "#-1" (the 'omitted' indicator) instead of looking up and 
filling in the current user's group with your default_run_group produce the 
correct result in all cases?

On Friday, July 20, 2018 at 5:34:28 AM UTC-3, Graham Dumpleton wrote:
>
> What do you get if you put this in a file and run Python on it.
>
> import os
> import pwd
>
> def default_run_group():
>     if os.name == 'nt':
>         return '#0'
>
>     try:
>         import pwd
>         uid = os.getuid()
>         entry = pwd.getpwuid(uid)
>     except KeyError:
>         return '#%d' % uid
>
>     try:
>         import grp
>         gid = entry.pw_gid
>         return grp.getgrgid(gid).gr_name
>     except KeyError:
>         return '#%d' % gid
>
> print(default_run_group())
>
> Looks a bit like you are running as a user which isn't in any groups.
>
> You can use the --group option to override it and pass something 
> appropriate.
>
> Graham
>
> On 20 Jul 2018, at 2:43 pm, YKdvd <[email protected] <javascript:>> 
> wrote:
>
> I ran mod_wsgi-express start-server.  If instead I do this:
>
> export MOD_WSGI_GROUP="#-1"
> mod_wsgi-express start-server
>
> everything works fine and the :8000 url gives me your test page.  And now 
> here at home on MacOS with Apache 2.4, I installed via pip and immediately 
> ran mod_wsgi-express start-server, and it worked fine.
>
> Is there any chance the Ubuntu Apache 2.4.18 is somehow handling the empty 
> "GROUP " in the config differently than the MacOS?  The other thing is that 
> the Ubuntu box is using SSSD to authenticate logins against our Active 
> Directory, so my group is "domain users" GID something like 167000513, not 
> a local group, though I'm not sure how that could have Apache throw the 
> parsing error it does.
>
> On Thursday, July 19, 2018 at 7:24:30 PM UTC-3, Graham Dumpleton wrote:
>>
>> How are you trying to use this? What command are you using to start with 
>> this configuration?
>>
>> It looks a bit like you are trying to use the generated httpd 
>> configuration with the system Apache system directly somehow, rather than 
>> using 'mod_wsgi-express start-server' or the generated 'apachectl' script 
>> as intended. So please explain what steps you have done after installing 
>> mod_wsgi using 'pip install'.
>>
>> Graham
>>
>> On 20 Jul 2018, at 7:54 am, YKdvd <[email protected]> wrote:
>>
>> I was trying to start using mod_wsgi_express (4.6.4), and my initial 
>> attempt produced this error: 
>>
>> AH00526: Syntax error on line 18 of 
>> /tmp/mod_wsgi-localhost:8000:167003626/httpd.conf:
>> Group takes one argument, Effective group id for this server
>>
>> It looks like when setting up the Apache /tmp/httpd.conf config, it 
>> doesn't provide a default value for the environment 
>> variable MOD_WSGI_GROUP, so if it doesn't exist an empty string gets used 
>> and line 18 looks like:
>>
>> Group ${MOD_WSGI_GROUP}
>>
>> which probably evaluate to "Group ".  Apache apparently wants a value if 
>> you specify "Group" at all, and startup halts at that point.  If I have a 
>> value for MOD_WSGI_GROUP in my environment before launch, things work, but 
>> I shouldn't have to have this set, should I - the express config should 
>> provide a default value of the current user's group?  This is Apache 2.4.18 
>> on Ubuntu 16.04.
>>
>>
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "modwsgi" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at https://groups.google.com/group/modwsgi.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> To post to this group, send email to [email protected] <javascript:>
> .
> Visit this group at https://groups.google.com/group/modwsgi.
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to