Thread: Python in Apache
i installed mod_python in apache , enabled it, when created test python page. here's looks like:
when try open page in firefox, downloads instead of displaying it, though. edited .htaccess file recognize .py files cgi. how display?code:#!/usr/bin/python3.2 import cgi print("content-type: application/xhtml+xml") print("""<?xml version="1.0" encoding="utf-8"?>\n <html xmlns="http://www.w3.org/1999/xhtml>\n \t<head>\n \t\t<title>a python page</title>\n \t\t<meta http-equiv="content-type" content="application/xhtml+xml;encoding="utf-8"/>\n \t</head>\n \t<body>\n \t\t<p>test</p>\n \t</body>\n </html>""")
what version of apache using , there reason why sticking mod_python.
have not used mod python can guide thought mod_wsgi if like.
information mod_wsgi can found here: http://code.google.com/p/modwsgi/
have used host couple of python applications.
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Ubuntu Dev Link Forum Python in Apache
Ubuntu
Comments
Post a Comment