No code signing error on mod_wsgi-express.
Hello, Im trying to use the mod_wsgi-express installed with pip3 install mod_wsgi on macOS with django and python3 version 3.10.9 to start a server but I get an error stating that the module lacks code signing.
You are better to use Apache httpd which comes with Homebrew on recent macOS versions. Apple has decided to disallow third party Apache modules with the system Apache unless they are signed with a valid developer certificate. No one has ever been able to explain to me how that is done or how to use a local certificate for signing.
Can you confirm whether you are though using mod_wsgi-express start-server or trying to manually configure Apache httpd supplied with the system. The latter doesn't work but mod_wsgi-express start-server had been working the last time I checked.
I used mod_wsgi-express start-server project_name/wsgi.py and got an error resembling:
[Sun Feb 12 11:12:00.892072 2023] [so:error] [pid 9269:tid 4302620032] AH06665: No code signing authority for module at /Users/ my.name/Documents/GitHub/My_Repo/.venv/lib/python3.10/site-packages/mod_wsgi/server/mod_wsgi-py310.cpython-310-darwin.so specified in LoadModule directive. httpd (mod_wsgi-express) : Syntax error on line 163 of /var/tmp/mod_wsgi-localhost:8000:503/httpd.conf: Code signing absent - not loading module at: /Users/ my.name/Documents/GitHub/My_Repo/.venv/lib/python3.10/site-packages/mod_wsgi/server/mod_wsgi-py310.cpython-310-darwin.so
- you're super cool by the way.
On Sun, 12 Feb 2023 at 11:50, Graham Dumpleton @.***> wrote:
You are better to use Apache httpd which comes with Homebrew on recent macOS versions. Apple has decided to disallow third party Apache modules with the system Apache unless they are signed with a valid developer certificate. No one has ever been able to explain to me how that is done or how to use a local certificate for signing.
Can you confirm whether you are though using mod_wsgi-express start-server or trying to manually configure Apache httpd supplied with the system. The latter doesn't work but mod_wsgi-express start-server had been working the last time I checked.
— Reply to this email directly, view it on GitHub https://github.com/GrahamDumpleton/mod_wsgi/issues/824#issuecomment-1426999863, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQXVRYK4GNJV2BK5CWJYMKTWXC57TANCNFSM6AAAAAAUZHJCUI . You are receiving this because you authored the thread.Message ID: @.***>
FWIW, don't know if still may work, but you can try procedure outlined in:
- https://www.simplified.guide/macos/apache-php-homebrew-codesign
- https://www.simplified.guide/macos/keychain-cert-code-signing-create
Let me know if try and it works.
When I get a chance will see if can validate myself this approach.
Thanks, I'll check it out.
It seams like I'm unable to make it work at the moment although it's probably more due to my inexperience with apache and code signing. I'll see if I can find someone who can help me but as it is right now I think I'll try running it in a virtual linux machine instead.