Mac 15.5 not letting mod_wsgi serve off the machine

7 views
Skip to first unread message

Leann Kanda

unread,
Jul 7, 2025, 7:03:37 PMJul 7
to modwsgi
I've had a Flask website for a while that has served nicely off a mac mini using mod_wsgi.  Last year I had to get a new mini, which means new OS.  I have succeeded in using mod_wsgi-standalone to get the site to appear on that machine's localhost:8000 and if I call the local IP address:8000 from that machine.  But any other machine on the network gets "Problem loading page, Unable to Connect" if trying that local IP:8000.  My best understanding is that this is a firewall/permissions issue.  How do I convince a modern Mac that the apache created by mod_wsgi-standalone in a .venv should be allowed to talk to other machines on port 8000? 

(did check ApplicationFirewall and python3 is allowed connections.  More worrisome, if I turn Firewall OFF, it still doesn't work.)

Any pointers much appreciated.
Leann


Graham Dumpleton

unread,
Jul 7, 2025, 7:11:57 PMJul 7
to mod...@googlegroups.com
I presume you mean you are using mod_wsgi-express???

If yes the default should be to listen on all hosts.

add_option('all', '--host', default=None, metavar='IP-ADDRESS',
        help='The specific host (IP address) interface on which '
        'requests are to be accepted. Defaults to listening on '
        'all host interfaces.’)

Try using:

—host A.B.C.D

Where A.B.C.D is the IP address of your Mac that you are using when accessing it from another machine.

I got myself a new Mac mini just recently and haven’t even properly set it up yet or even tried mod_wsgi-express on it. I will try later myself and see what works.

Graham

--
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.
To view this discussion visit https://groups.google.com/d/msgid/modwsgi/e358fed9-bb48-4f15-b22b-f1d23c2aefe2n%40googlegroups.com.

Graham Dumpleton

unread,
Jul 7, 2025, 11:42:38 PMJul 7
to mod...@googlegroups.com
I ran a test myself and had no issues with accessing from a phone on the same network.

Note that one tool you can use to check is not an issue with local network configuration is:

    traceroute -p 8000 A.B.C.D

If you have also changed any network access points recently, do be aware that some, especially if using a guess network, will prevent access between machines on the same sub net by default and you have to allow it in the router configuration.

Graham

Leann Kanda

unread,
Jul 8, 2025, 3:49:38 PMJul 8
to mod...@googlegroups.com
Thank you so much for such fast response!  To clarify, yes, the server is running using mod_wsgi-express; the package installation into python was mod_wsgi-standalone so that I could avoid the Mac's Apache which was being cranky about needing a signed certificate.  

I ran mod_wsgi-express start-server myappscript.wsgi —host A.B.C.D
When I then tried to access from the same machine using A.B.C.D:8000 in the browser, for the first time it gave me the request to allow httpd to accept connections through the firewall! So that was great.

The other machine’s browser still wouldn’t connect to A.B.C.D:8000, but the traceroute did ping.  However I was able on other machine to go to System Settings->Privacy and Security-> Local Network, and for the first time Firefox (browser I’ve been using) appeared as an option to access to Local Network.  And yay, now second machine can access the website!

I will still need to convince the router to do port forwarding so that the external DYNDNS can talk to the :8000 and serve it under a nice name to the world, but I’m successfully sharing to the local network, so that’s not a mod_wsgi problem.

I’m really a biologist who codes out of necessity, and am therefore extra grateful not only for the open source packages but also the kind support!

Best.
Leann
 


Graham Dumpleton

unread,
Jul 8, 2025, 7:44:19 PMJul 8
to mod...@googlegroups.com, mod...@googlegroups.com
Rather than punching a whole through your router. I would suggest using cloudflare tunnels. If you also get a domain through cloudlfare you can then also have it handle SSL for you. Somewhat safer than reconfiguring your router.

On 9 Jul 2025, at 5:49 am, Leann Kanda <leann...@gmail.com> wrote:

Thank you so much for such fast response!  To clarify, yes, the server is running using mod_wsgi-express; the package installation into python was mod_wsgi-standalone so that I could avoid the Mac's Apache which was being cranky about needing a signed certificate.  

Leann Kanda

unread,
Jul 8, 2025, 8:03:30 PMJul 8
to mod...@googlegroups.com
Thanks, I will check that out!
:)
L

On Jul 8, 2025, at 7:44 PM, Graham Dumpleton <graham.d...@gmail.com> wrote:


Reply all
Reply to author
Forward
0 new messages