How can I run python on apache in Manjaro?

I installed httpd and mod_wsgi as been told here. And changed all the configuration it was written there.
but still when I put a python file path in browser URl bar, I get a raw file data :frowning:

URL: http://localhost/intelp/load.py

Respond I get:

#!/usr/bin/python
print("Hello Brother :)")

This is not an wsgi application. See Quick Configuration Guide — mod_wsgi 4.9.4 documentation

Also you need to configure Apache in some way that it know which is your Python wsgi application. See
https://modwsgi.readthedocs.io/en/master/configuration-directives/WSGIScriptAlias.html

and/or the example in the Arch Wiki. Apache HTTP Server/mod_wsgi - ArchWiki

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.