Monday, June 24, 2013

Re: Question about python for web

check permission  by chmod
 and verify that handler is correct

Many thanks,

Serge


+380 636150445
skype: skhohlov


On Mon, Jun 24, 2013 at 4:07 AM, Dat Huynh <htdatcse@gmail.com> wrote:
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
into the folder "/usr/libexec/apache2"
  
Step 2: Add the following line:
  LoadModule wsgi_module     libexec/apache2/mod_wsgi.so  into the file "/etc/apache/httpd.conf"

Step 3: Edit a file "test.py" as below and copy the file to the folder "/Library/WebServer/". 
  #!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.






--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate