Can you do the following for me to test what Apache does?
Run your 'mod_wsgi-express start-server' command with the '--setup-only' option
added.
Edit the 'httpd.conf' generated and add single quotes around values for User
and Group.
That is:
User '${MOD_WSGI_USER}'
Group '${MOD_WSGI_GROUP}'
Then run:
./apachectl start
using the 'apachectl' script in the same directory as the generated httpd.conf
file.
I just want to check that Apache and your OS aren't going to die when given a
group name with spaces in it for other reasons.
When done, run:
./apachectl stop
Graham
> On 20 Jul 2018, at 10:05 pm, YKdvd <[email protected]> wrote:
>
> 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 <http://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 <david...@ <>gmail.com
>> <http://gmail.com/>> 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 <david...@ <>gmail.com
>>> <http://gmail.com/>> 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 modwsgi+u...@ <>googlegroups.com <http://googlegroups.com/>.
>>> To post to this group, send email to mod...@ <>googlegroups.com
>>> <http://googlegroups.com/>.
>>> Visit this group at https://groups.google.com/group/modwsgi
>>> <https://groups.google.com/group/modwsgi>.
>>> For more options, visit https://groups.google.com/d/optout
>>> <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
>> <https://groups.google.com/group/modwsgi>.
>> For more options, visit https://groups.google.com/d/optout
>> <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]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/modwsgi
> <https://groups.google.com/group/modwsgi>.
> For more options, visit https://groups.google.com/d/optout
> <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.