Update on this! I was able to re-install with compiled-in worker MPM with 
command:
sudo port install apache2 +workermpm

Note there is no mention of this option on the instruction page:
https://trac.macports.org/wiki/howto/Apache2

Now all is working as intended! Hope this info helps someone!

-- Gnarlie

On Wednesday, February 8, 2023 at 7:38:09 AM UTC-7 Gnarlodious wrote:

> Seems like it. I got so tired of this nonsense after years that I also 
> have a Raspberry Pi on the LAN that runs mod_wsgi no trouble. It's been a 
> good compromise, the Macbook is convenient for coding, but the R-Pi runs 
> the webapp the way it was intended. I'd recommend it for anyone.
>
> -- Gnarlie
>
> On Tuesday, February 7, 2023 at 11:49:07 PM UTC-7 Graham Dumpleton wrote:
>
>> As I already said, you can't build Apache httpd from source code yourself 
>> on macOS. The APR library it uses will not build on macOS and they haven't 
>> made a release for so many years it has never been fixed. HomeBrew and 
>> MacPorts would patch it to get it to compile and I am not clear on what the 
>> patch is.
>>
>> Overall I would suggest ditching MacPorts. It has always been inferior to 
>> HomeBrew and has always caused lots of problems for mod_wsgi because their 
>> Python distro is often broken and can't build embedded applications 
>> properly. Seems their Apache httpd is also inferior as well.
>>
>> Graham
>>
>> On 8 Feb 2023, at 5:42 pm, Gnarlodious <[email protected]> wrote:
>>
>> There isn't any worker or event module included with the MacPorts Apache, 
>> and prefork is compiled in. Meanwhile mod_wsgi is working well enough as it 
>> is, maybe sometime later I will try to build a custom Apache.
>>
>> Thanks.
>>
>> -- Gnarlie
>> On Tuesday, February 7, 2023 at 2:53:29 PM UTC-7 Graham Dumpleton wrote:
>>
>>> It may have default prefork configured, but you should be able to 
>>> dynamically override that through configuration to either worker or event 
>>> MPM. The only time you wouldn't is if they static compiled all Apache 
>>> modules in, which is not usually done and would be pretty stupid on their 
>>> part if they are.
>>>
>>> Look for LoadModule mpm_prefork_module line and see if alternatives are 
>>> commented out for other MPMs and just change which is used.
>>>
>>> Graham
>>>
>>> On 8 Feb 2023, at 8:48 am, Gnarlodious <[email protected]> wrote:
>>>
>>> So I installed the MacPorts mod_wsgi which was pretty simple and works 
>>> well. Unfortunately the MacPorts Apache has the default compiled-in MPM of 
>>> "prefork", which causes my WSGI sessions to expire after about 10 seconds. 
>>> Looks like I will need to download the Apache installer and build it with 
>>> the "worker" MPM to get mod_wsgi to behave like I want.
>>>
>>> -- Gnarlie
>>>
>>> On Tuesday, February 7, 2023 at 9:39:34 AM UTC-7 Gnarlodious wrote:
>>>
>>>>
>>>> Okay, it looks like I installed Macports Apache, since Homebrew has 
>>>> given me such trouble in the past. They also have mod_wsgi: 
>>>> https://ports.macports.org/port/mod_wsgi/details/ but it says 
>>>> unverified for ARM64 processor. Will give it a try and report back if it 
>>>> works
>>>>
>>>> -- Gnarlie
>>>>
>>>> On Tuesday, February 7, 2023 at 12:09:10 AM UTC-7 Graham Dumpleton 
>>>> wrote:
>>>>
>>>>> You can't use configure/make/make install (CMMI) method to install on 
>>>>> macOS if is system Apache httpd as Apple supplied Apache httpd is broken. 
>>>>> Installing from upstream Apache httpd source code also will not work. You 
>>>>> need to install Apache httpd using Homebrew and use that instead if want 
>>>>> to 
>>>>> use CMMI method.
>>>>>
>>>>> As to Python, Apple supplied Apache is not under /opt/local so 
>>>>> somewhat doubt that is Xcode version.
>>>>>
>>>>> Either way, you can try using "pip install mod_wsgi" method instead. 
>>>>> See:
>>>>>
>>>>> [image: twitter.abaf4b19.webp]
>>>>>
>>>>> mod-wsgi <https://pypi.org/project/mod-wsgi/>
>>>>> pypi.org <https://pypi.org/project/mod-wsgi/>
>>>>> <https://pypi.org/project/mod-wsgi/>
>>>>>  
>>>>> This should work, although do note that latest macOS versions block 
>>>>> you running third party Apache module, so your only choice is to use 
>>>>> mod_wsgi-express instead and you can't manually configure Apache using 
>>>>> the 
>>>>> module it builds.
>>>>>
>>>>> Using HomeBrew Apache avoids the macOS restrictions on third party 
>>>>> Apache modules as well.
>>>>>
>>>>> Graham
>>>>>
>>>>> On 7 Feb 2023, at 6:00 pm, Gnarlodious <[email protected]> wrote:
>>>>>
>>>>> I ran:
>>>>> ./configure --with-python=/opt/local/bin/python 
>>>>> --with-apxs=/opt/local/bin/apxs
>>>>>
>>>>> ...which points to Python3.9 in Xcode.
>>>>>
>>>>> I said make and got errors at the end with no build file:
>>>>> ld: warning: directory not found for option 
>>>>> '-L/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/config'
>>>>> ld: warning: -undefined dynamic_lookup may not work with chained fixups
>>>>>
>>>>> There is a folder at
>>>>>
>>>>> /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9
>>>>> ...but no config folder inside it.
>>>>>
>>>>> This is MacOS 13.1
>>>>>
>>>>> What's the next step?
>>>>>
>>>>> -- Gnarlie
>>>>>
>>>>> -- 
>>>>> 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 view this discussion on the web visit 
>>>>> https://groups.google.com/d/msgid/modwsgi/b3d3caea-1101-4b3e-9989-484f6ba511e2n%40googlegroups.com
>>>>>  
>>>>> <https://groups.google.com/d/msgid/modwsgi/b3d3caea-1101-4b3e-9989-484f6ba511e2n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>>>
>>>>>
>>> -- 
>>> 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 view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/modwsgi/f9d57376-4d6d-4148-86b9-63c3a30ace14n%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/modwsgi/f9d57376-4d6d-4148-86b9-63c3a30ace14n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>>
>>>
>> -- 
>> 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 view this discussion on the web visit 
>> https://groups.google.com/d/msgid/modwsgi/39b3e75f-3ef5-49ff-8d38-c51023d4a63bn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/modwsgi/39b3e75f-3ef5-49ff-8d38-c51023d4a63bn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>
>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/modwsgi/4c90d6e1-80b3-4da2-a0e6-6edf0119c40en%40googlegroups.com.

Reply via email to