Dear all,

I have a very simple question about running a simple web application with
apache on MacOS.

Step 1: Copy the file mod_wsgi.so from the link
http://code.google.com/p/modwsgi/downloads/detail?name=mod_wsgi-macosx106-ap22py26-3.3.so
into the folder "/usr/libexec/apache2"


Step 2: Add the following line:

  LoadModule wsgi_module     libexec/apache2/mod_wsgi.so
into the file "/etc/apache2/httpd.conf"


Step 3: Edit a file "test.py" as below and copy the file to the folder
"/Library/WebServer/Documents".

#!usr/bin/python
print "Content-type: text/html"
print
print "<html><head>"
print ""
print "</head><body>"
print "Test Page"
print "</body></html>"

When I type the following url "http://localhost/test.py"; on my browser, I
see exactly the content of the file, NOT the text "Test Page" only.

I think I miss something in the procedure.
What should I do to make my browser process the received HTML data?

Thank you very much.

Sincerely,
Dat.
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to