On Aug 14, 11:26 am, John Yeukhon Wong <gokoproj...@gmail.com> wrote:
> Hi, I know most of you work on Linux, but I do need this to be done on
> Windows for a very personal reason.
>
> I mainly followed this tutorial here, except that I use mod_wsgi over
> mod_python.http://wiki.thinkhole.org/howto:django_on_windows
>
> I had my python 2.7, apache, mod_wsgi and postreg all installed under
> my F drive.
> This is the folder:  F:/public, and I created a project called
> testproject, so I have F:/public/testproject
>
> I am stuck at configuration Django with Apache (and mod_wsgi).
> I spent 5 hours searching and reading the documentation and still
> can't figure out how to do it right.
>
> I read thishttp://code.google.com/p/modwsgi/wiki/IntegrationWithDjango
>
> I created two files:  apache_django_wsgi.conf and django.wsgi under F:/
> public/testproject/apache, where apache is a manual created folder.
> The actual Apache is installed under F:/Apache Software Foundation/
> Apache2.2
>
> I did these for Apache2.2/conf/httpd.conf
>
> LoadModule wsgi_module modules/mod_wsgi.so
> Include "f:/public/testproject/apache/apache_django_wsgi.conf"
>
> So good so far. No error after restart ApACHE.
>
> Now, I have to setup those two files.
>
> I had this for the conf (I just copied it from the google doc....)
>
> # Code begin here
> Alias /media/ f:/public/testproject/media/
>
> <Directory f:/public/testproject/media>
> Order deny,allow
> Allow from all
> </Directory>
>
> WSGIScriptAlias / "f:/public/testproject/apache/django.wsgi"
>
> <Directory "f:/public/testproject/apache">
> Order deny,allow
> Allow from all
> </Directory>
> #Code ends here
>
> However, I was suspecting something bad to happen...
>
> OKay. For django.wsgi
>
> // code begins here
> import os, sys
> sys.path.append("f:/public")
>
> os.environ['DJANGO_SETTINGS_MODULE'] = 'testproject.settings'
>
> import django.core.handlers.wsgi
> application = django.core.handlers.wsgi.WSGIHandler()
>
> // code ends here
>
> This one is better - I know the info is good and correct.
>
> Now I restarted the apache again, no error.
>
> But when I try to access to my localhost or localhost/testproject I
> received this message
>
> Forbidden:   You don't have permission to access /testproject/ on this
> server.
>
> I was denied, I don't know why we need that script anyway...
>
> How should I set it up? How do I test if everything is working well?

Did you try and walk before you ran? ;-)

That is, did you try getting a WSGI hello world program working before
you decided to try and get Django site to work?

Anyway, you need to look at the Apache error logs to find out the
actual reason why Apache has given you a 403 error.

I suggest you also go watch my mod_wsgi talk where it references
exactly why you get some of these problems, including Forbidden
errors, with examples of the errors you will see in Apache error log.
Links to talk at:

  
http://code.google.com/p/modwsgi/wiki/WhereToGetHelp?tm=6#Conference_Presentations

Graham

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to